Documentation ¶
Index ¶
- type MockAddHeaderFn
- type MockClearTokenFn
- type MockNewRequestFn
- type MockRawRequestWithContextFn
- type MockSetNamespaceFn
- type MockSetTokenFn
- type MockTokenFn
- type RequestFn
- type VaultClient
- func (c *VaultClient) AddHeader(key, value string)
- func (c *VaultClient) ClearToken()
- func (c *VaultClient) NewRequest(method, requestPath string) *vault.Request
- func (c *VaultClient) RawRequestWithContext(ctx context.Context, r *vault.Request) (*vault.Response, error)
- func (c *VaultClient) SetNamespace(namespace string)
- func (c *VaultClient) SetToken(v string)
- func (c *VaultClient) Token() string
- type VaultListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAddHeaderFn ¶ added in v0.4.0
type MockAddHeaderFn func(key, value string)
func NewAddHeaderFn ¶ added in v0.4.0
func NewAddHeaderFn() MockAddHeaderFn
type MockClearTokenFn ¶ added in v0.3.6
type MockClearTokenFn func()
func NewClearTokenFn ¶ added in v0.3.6
func NewClearTokenFn() MockClearTokenFn
type MockNewRequestFn ¶
func NewMockNewRequestFn ¶
func NewMockNewRequestFn(req *vault.Request) MockNewRequestFn
func NewMockNewRequestListFn ¶ added in v0.5.0
func NewMockNewRequestListFn(req *vault.Request) MockNewRequestFn
type MockRawRequestWithContextFn ¶
type MockRawRequestWithContextFn func(ctx context.Context, r *vault.Request) (*vault.Response, error)
func NewMockRawRequestListWithContextFn ¶ added in v0.5.0
func NewMockRawRequestListWithContextFn(res map[string]VaultListResponse, err error) MockRawRequestWithContextFn
func NewMockRawRequestWithContextFn ¶
func NewMockRawRequestWithContextFn(res *vault.Response, err error, ofn ...RequestFn) MockRawRequestWithContextFn
type MockSetNamespaceFn ¶
type MockSetNamespaceFn func(namespace string)
func NewSetNamespaceFn ¶
func NewSetNamespaceFn() MockSetNamespaceFn
type MockSetTokenFn ¶
type MockSetTokenFn func(v string)
func NewSetTokenFn ¶
func NewSetTokenFn(ofn ...func(v string)) MockSetTokenFn
type MockTokenFn ¶ added in v0.3.6
type MockTokenFn func() string
func NewTokenFn ¶ added in v0.3.6
func NewTokenFn(v string) MockTokenFn
type RequestFn ¶
An RequestFn operates on the supplied Request. You might use an RequestFn to test or update the contents of an Request.
type VaultClient ¶
type VaultClient struct { MockNewRequest MockNewRequestFn MockRawRequestWithContext MockRawRequestWithContextFn MockSetToken MockSetTokenFn MockToken MockTokenFn MockClearToken MockClearTokenFn MockSetNamespace MockSetNamespaceFn MockAddHeader MockAddHeaderFn }
func (*VaultClient) AddHeader ¶ added in v0.4.0
func (c *VaultClient) AddHeader(key, value string)
func (*VaultClient) ClearToken ¶ added in v0.3.6
func (c *VaultClient) ClearToken()
func (*VaultClient) NewRequest ¶
func (c *VaultClient) NewRequest(method, requestPath string) *vault.Request
func (*VaultClient) RawRequestWithContext ¶
func (*VaultClient) SetNamespace ¶
func (c *VaultClient) SetNamespace(namespace string)
func (*VaultClient) SetToken ¶
func (c *VaultClient) SetToken(v string)
func (*VaultClient) Token ¶ added in v0.3.6
func (c *VaultClient) Token() string
Click to show internal directories.
Click to hide internal directories.