Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuthOptions ¶
BasicAuthOptions contains options regarding to basic authentication.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper around the vault client
func New ¶
New returns an *vault.Client with a connection to named machines. It returns an error if a connection to the cluster cannot be made.
func (*Client) Close ¶
func (c *Client) Close()
Close is only meant to fulfill the easykv.ReadWatcher interface. Does nothing.
func (*Client) GetValues ¶
GetValues is used to lookup all keys with a prefix. Several prefixes can be specified in the keys array.
func (*Client) WatchPrefix ¶
func (c *Client) WatchPrefix(ctx context.Context, prefix string, opts ...easykv.WatchOption) (uint64, error)
WatchPrefix - not implemented at the moment
type Option ¶
type Option func(*Options)
Option configures the vault client.
func WithBasicAuth ¶
func WithBasicAuth(b BasicAuthOptions) Option
WithBasicAuth enables the basic authentication and sets the username and password.
func WithRoleID ¶
WithRoleID sets the RoleID (approle auth method).
func WithSecretID ¶
WithSecretID sets the ScretID (approle auth method).
func WithTLSOptions ¶
func WithTLSOptions(tls TLSOptions) Option
WithTLSOptions sets the TLSOptions.
func WithUserID ¶
WithUserID sets the UserID (app-id auth method).
type Options ¶
type Options struct { RoleID string SecretID string AppID string UserID string Token string TLS TLSOptions Auth BasicAuthOptions }
Options contains all values that are needed to connect to vault.
type TLSOptions ¶
TLSOptions contains all certificates and keys.