fake

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

type MockNewRequestFn func(method, requestPath string) *vault.Request

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

type RequestFn func(req *vault.Request) error

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 (c *VaultClient) RawRequestWithContext(ctx context.Context, r *vault.Request) (*vault.Response, error)

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

type VaultListResponse added in v0.5.0

type VaultListResponse struct {
	Metadata *vault.Response
	Data     *vault.Response
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL