Documentation ¶
Overview ¶
Package vault includes vault implementation of Gnomock Preset interface. This Preset can be passed to gnomock.Start() function to create a configured vault container to use in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
CreateToken creates an additional access token with the provided policies. Use the same password you provided with the WithAuthToken option.
Types ¶
type Option ¶
type Option func(*P)
Option is an optional configuration of this Gnomock preset. Use available Options to configure the container.
func WithAuthToken ¶
WithAuthToken sets authentication (root) token to be used to connect to this container.
func WithPolicies ¶
WithPolicies configures vault with the provided policies.
type P ¶
type P struct { Version string `json:"version"` AuthToken string `json:"auth_token"` Auth []Auth `json:"auth"` Policies []Policy `json:"policies"` }
P is a Gnomock Preset implementation for vault.
func (*P) Ports ¶
func (p *P) Ports() gnomock.NamedPorts
Ports returns ports that should be used to access this container.