mock

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 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 Client

type Client struct {
	CreateNativeKeyFunc CreateNativeKeyFuncType
	DeleteNativeFunc    DeleteNativeFuncType
	EnableNativeFunc    EnableNativeFuncType
	DisableNativeFunc   DisableNativeFuncType
}

Client is a manual mock for the Client interface

func NewClientMock

func NewClientMock() *Client

NewClientMock creates and returns a new instance of Client.

func (*Client) CreateKeyVersion

func (m *Client) CreateKeyVersion(
	ctx context.Context,
	options providers.KeyInput,
) (*string, error)

CreateKeyVersion simulates the creation of a key version by calling the CreateNativeKeyFunc.

func (*Client) DeleteKeyVersion

func (m *Client) DeleteKeyVersion(
	ctx context.Context,
	nativeKeyID string,
	options providers.DeleteOptions,
) error

DeleteKeyVersion simulates the deletion of a key version by calling the DeleteNativeFunc.

func (*Client) DisableKeyVersion

func (m *Client) DisableKeyVersion(ctx context.Context, nativeKeyID string) error

DisableKeyVersion simulates disabling a key version by calling the DisableNativeFunc.

func (*Client) EnableKeyVersion

func (m *Client) EnableKeyVersion(ctx context.Context, nativeKeyID string) error

EnableKeyVersion simulates enabling a key version by calling the EnableNativeFunc.

func (*Client) WithCreateNativeKey

func (m *Client) WithCreateNativeKey(f CreateNativeKeyFuncType) *Client

WithCreateNativeKey sets the CreateNativeKeyFunc for the Client and returns the updated Client.

func (*Client) WithDeleteNative

func (m *Client) WithDeleteNative(f DeleteNativeFuncType) *Client

WithDeleteNative sets the DeleteNativeFunc for the Client and returns the updated Client.

func (*Client) WithDisableNative

func (m *Client) WithDisableNative(f DisableNativeFuncType) *Client

WithDisableNative sets the DisableNativeFunc for the Client and returns the updated Client.

func (*Client) WithEnableNative

func (m *Client) WithEnableNative(f EnableNativeFuncType) *Client

WithEnableNative sets the EnableNativeFunc for the Client and returns the updated Client.

type CreateNativeKeyFuncType

type CreateNativeKeyFuncType func(ctx context.Context, options providers.KeyInput) (*string, error)

type DeleteNativeFuncType

type DeleteNativeFuncType func(ctx context.Context, nativeKeyID string, options providers.DeleteOptions) error

type DisableNativeFuncType

type DisableNativeFuncType func(ctx context.Context, nativeKeyID string) error

type EnableNativeFuncType

type EnableNativeFuncType func(ctx context.Context, nativeKeyID string) error

Jump to

Keyboard shortcuts

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