Documentation ¶
Overview ¶
Package fake contains a fake Vault signer for use in tests
Index ¶
- type Client
- func (c *Client) NewRequest(method, requestPath string) *vault.Request
- func (c *Client) RawRequest(r *vault.Request) (*vault.Response, error)
- func (c *Client) SetToken(v string)
- func (c *Client) Sys() *vault.Sys
- func (c *Client) Token() string
- func (c *Client) WithNewRequest(r *vault.Request) *Client
- func (c *Client) WithRawRequest(resp *vault.Response, err error) *Client
- type Vault
- func (v *Vault) IsVaultInitializedAndUnsealed() error
- func (v *Vault) New(ns string, sl configreader.ConfigReader, iss v1.GenericIssuer) (*Vault, error)
- func (v *Vault) Sign(csrPEM []byte, duration time.Duration) ([]byte, []byte, error)
- func (v *Vault) Sys() *vault.Sys
- func (v *Vault) WithNew(f func(string, configreader.ConfigReader, v1.GenericIssuer) (*Vault, error)) *Vault
- func (v *Vault) WithSign(certPEM, caPEM []byte, err error) *Vault
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { NewRequestS *vault.Request RawRequestFn func(r *vault.Request) (*vault.Response, error) // contains filtered or unexported fields }
func NewFakeClient ¶
func NewFakeClient() *Client
type Vault ¶
type Vault struct { NewFn func(string, configreader.ConfigReader, v1.GenericIssuer) (*Vault, error) SignFn func([]byte, time.Duration) ([]byte, []byte, error) IsVaultInitializedAndUnsealedFn func() error }
func (*Vault) IsVaultInitializedAndUnsealed ¶
IsVaultInitializedAndUnsealed always returns nil
func (*Vault) New ¶
func (v *Vault) New(ns string, sl configreader.ConfigReader, iss v1.GenericIssuer) (*Vault, error)
New call NewFn and returns a pointer to the fake Vault.
func (*Vault) WithNew ¶
func (v *Vault) WithNew(f func(string, configreader.ConfigReader, v1.GenericIssuer) (*Vault, error)) *Vault
WithNew sets the fake Vault's New function.
Click to show internal directories.
Click to hide internal directories.