fake

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockNewRequestFn

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

func NewMockNewRequestFn

func NewMockNewRequestFn(req *vault.Request) MockNewRequestFn

type MockRawRequestWithContextFn

type MockRawRequestWithContextFn func(ctx context.Context, r *vault.Request) (*vault.Response, error)

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 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
	MockSetNamespace          MockSetNamespaceFn
}

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)

Jump to

Keyboard shortcuts

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