Documentation ¶
Index ¶
- type Client
- func (c *Client) AddPKI2Clean(pkiPath string)
- func (c *Client) Address() string
- func (c *Client) CreateSecret(fullPath string, data map[string]interface{}) error
- func (c *Client) DeleteSecret(fullPath string) error
- func (c *Client) GetRawSecret(fullPath string) (*api.Secret, error)
- func (c *Client) GetSecret(secretPath string) (string, bool, error)
- func (c *Client) GetSecretData(secret *api.Secret, dataPath string) (string, error)
- func (c *Client) GetSecretWithPrefix(prefix, secretPath string) (string, bool, error)
- func (c *Client) Logical() *api.Logical
- func (c *Client) SkipVerify() bool
- type Option
- func Addr(addr string, skipVerify bool) Option
- func AuthMethod(authMethod string) Option
- func Config(config *api.Config) Option
- func ContextWithCancelFN(ctx context.Context, cancelFn context.CancelFunc) Option
- func Logger(logger logr.Logger) Option
- func Role(role string) Option
- func SecretsPathPrefix(prefix string) Option
- func Timeout(timeout int) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct would hold connection to Vault
func (*Client) AddPKI2Clean ¶
AddPKI2Clean would add your PKI to cleanup
func (*Client) CreateSecret ¶
CreateSecret would create secret in Vault
func (*Client) DeleteSecret ¶
DeleteSecret would delete secret from Vault
func (*Client) GetRawSecret ¶
GetRawSecret would get raw (unparsed secret) from Vault
func (*Client) GetSecret ¶
GetSecret would return string (if found), bool that secret is base64 binary, error if something gets wrong
func (*Client) GetSecretData ¶
GetSecretData will return secret data as string from path dataPath
func (*Client) GetSecretWithPrefix ¶
GetSecretWithPrefix would return string (if found), bool that secret is base64 binary, error if something gets wrong
func (*Client) SkipVerify ¶
SkipVerify would return if we should skip Vault TLS cert verification
type Option ¶
Option is a type of options for Vault Client
func AuthMethod ¶
AuthMethod is option function to set Vault authentication method, only possibles are aws (default) and test (for testing)
func ContextWithCancelFN ¶
func ContextWithCancelFN(ctx context.Context, cancelFn context.CancelFunc) Option
ContextWithCancelFN is option function to set channel for termination notifications from renew and also set upstream context
func SecretsPathPrefix ¶
SecretsPathPrefix is option function to set Vault secrets path prefix