WebService::HashiCorp::Vault::Base - Perl API for HashiCorp's Vault (Base)
version 0.004
package WebService::HashiCorp::Vault::Something; use Moo; extends 'WebService::HashiCorp::Vault::Base';
Base class for everything in WebService::HashiCorp::Vault.
Builds on top of WebService::Client, adds a few things.
my $obj = WebService::HashiCorp::Vault::Something->new( base_url => 'https://127.0.0.1:8200' ); my $base_url = $obj->base_url();
The base url of the Vault instance you are talking to. Is read-only once you have created the object.
my $obj = WebService::HashiCorp::Vault::Something->new( token => 'xxxxxxxxxxxx' ); my $token = $obj->token();
The authentication token, is read-only after object is created.
my $obj = WebService::HashiCorp::Vault::Something->new( version => 'v1' ); my $version = $obj->version();
Allows you to set the API version if it changes in the future. Default to 'v1' and you probably don't need to touch it.
Read-only one the object is created.
my $obj = WebService::HashiCorp::Vault::Something->new( mount => '/something' ); my $version = $obj->mount();
The mount location of the resource. There is no default, but you should apply one in your class that builds upon this class.
my $list = $obj->list('path');
HashiCorp have decided that 'LIST' is a http verb, so we must hack it in.
You can pretend this is now a normal part of WebService::Client upon which this module is based.
WebService::HashiCorp::Vault
Dean Hamstead <dean@bytefoundry.com.au>
This software is copyright (c) 2017 by Dean Hamstad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::HashiCorp::Vault, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::HashiCorp::Vault
CPAN shell
perl -MCPAN -e shell install WebService::HashiCorp::Vault
For more information on module installation, please visit the detailed CPAN module installation guide.