Documentation
¶
Index ¶
- type VaultClient
- func (c *VaultClient) AppIDAuth(appid string, useridpath string) error
- func (c *VaultClient) GetBase64Value(path string) ([]byte, error)
- func (c *VaultClient) GetStringValue(path string) (string, error)
- func (c *VaultClient) GetValue(path string) (interface{}, error)
- func (c *VaultClient) TokenAuth(token string) error
- func (c *VaultClient) WriteValue(path string, data []byte) error
- type VaultConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VaultClient ¶
type VaultClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *VaultConfig) (*VaultClient, error)
NewClient returns a VaultClient object or error
func (*VaultClient) AppIDAuth ¶
func (c *VaultClient) AppIDAuth(appid string, useridpath string) error
AppIDAuth attempts to perform app-id authorization.
func (*VaultClient) GetBase64Value ¶
func (c *VaultClient) GetBase64Value(path string) ([]byte, error)
GetBase64Value retrieves and decodes a value expected to be base64-encoded binary
func (*VaultClient) GetStringValue ¶
func (c *VaultClient) GetStringValue(path string) (string, error)
GetStringValue retrieves a value expected to be a string
func (*VaultClient) GetValue ¶
func (c *VaultClient) GetValue(path string) (interface{}, error)
GetValue retrieves value at path
func (*VaultClient) TokenAuth ¶
func (c *VaultClient) TokenAuth(token string) error
TokenAuth sets the client token but doesn't check validity
func (*VaultClient) WriteValue ¶
func (c *VaultClient) WriteValue(path string, data []byte) error
WriteValue writes value=data at path
type VaultConfig ¶
type VaultConfig struct {
Server string // protocol, hostname and port (https://vault.foo.com:8200)
}
Click to show internal directories.
Click to hide internal directories.