kms

package
v0.0.0-...-19bd712 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 9 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 interface {
	ListKeys(ctx context.Context, params *kmsClient.ListKeysInput, optFns ...func(*kmsClient.Options)) (*kmsClient.ListKeysOutput, error)
	DescribeKey(ctx context.Context, params *kmsClient.DescribeKeyInput, optFns ...func(*kmsClient.Options)) (*kmsClient.DescribeKeyOutput, error)
	GetKeyRotationStatus(ctx context.Context, params *kmsClient.GetKeyRotationStatusInput, optFns ...func(*kmsClient.Options)) (*kmsClient.GetKeyRotationStatusOutput, error)
}

type KMS

type KMS interface {
	// Returns keys with KeySpec set to KeySpecSymmetricDefault
	DescribeSymmetricKeys(ctx context.Context) ([]awslib.AwsResource, error)
}

type KmsInfo

type KmsInfo struct {
	KeyMetadata        types.KeyMetadata `json:"key_metadata"`
	KeyRotationEnabled bool              `json:"key_rotation_enabled"`
	// contains filtered or unexported fields
}

func (KmsInfo) GetRegion

func (k KmsInfo) GetRegion() string

func (KmsInfo) GetResourceArn

func (k KmsInfo) GetResourceArn() string

func (KmsInfo) GetResourceName

func (k KmsInfo) GetResourceName() string

func (KmsInfo) GetResourceType

func (k KmsInfo) GetResourceType() string

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) DescribeKey

func (_m *MockClient) DescribeKey(ctx context.Context, params *servicekms.DescribeKeyInput, optFns ...func(*servicekms.Options)) (*servicekms.DescribeKeyOutput, error)

DescribeKey provides a mock function with given fields: ctx, params, optFns

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) GetKeyRotationStatus

func (_m *MockClient) GetKeyRotationStatus(ctx context.Context, params *servicekms.GetKeyRotationStatusInput, optFns ...func(*servicekms.Options)) (*servicekms.GetKeyRotationStatusOutput, error)

GetKeyRotationStatus provides a mock function with given fields: ctx, params, optFns

func (*MockClient) ListKeys

func (_m *MockClient) ListKeys(ctx context.Context, params *servicekms.ListKeysInput, optFns ...func(*servicekms.Options)) (*servicekms.ListKeysOutput, error)

ListKeys provides a mock function with given fields: ctx, params, optFns

type MockClient_DescribeKey_Call

type MockClient_DescribeKey_Call struct {
	*mock.Call
}

MockClient_DescribeKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeKey'

func (*MockClient_DescribeKey_Call) Return

func (*MockClient_DescribeKey_Call) Run

type MockClient_Expecter

type MockClient_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockClient_Expecter) DescribeKey

func (_e *MockClient_Expecter) DescribeKey(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeKey_Call

DescribeKey is a helper method to define mock.On call

  • ctx context.Context
  • params *servicekms.DescribeKeyInput
  • optFns ...func(*servicekms.Options)

func (*MockClient_Expecter) GetKeyRotationStatus

func (_e *MockClient_Expecter) GetKeyRotationStatus(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetKeyRotationStatus_Call

GetKeyRotationStatus is a helper method to define mock.On call

  • ctx context.Context
  • params *servicekms.GetKeyRotationStatusInput
  • optFns ...func(*servicekms.Options)

func (*MockClient_Expecter) ListKeys

func (_e *MockClient_Expecter) ListKeys(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_ListKeys_Call

ListKeys is a helper method to define mock.On call

  • ctx context.Context
  • params *servicekms.ListKeysInput
  • optFns ...func(*servicekms.Options)

type MockClient_GetKeyRotationStatus_Call

type MockClient_GetKeyRotationStatus_Call struct {
	*mock.Call
}

MockClient_GetKeyRotationStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyRotationStatus'

func (*MockClient_GetKeyRotationStatus_Call) Return

func (*MockClient_GetKeyRotationStatus_Call) Run

type MockClient_ListKeys_Call

type MockClient_ListKeys_Call struct {
	*mock.Call
}

MockClient_ListKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListKeys'

func (*MockClient_ListKeys_Call) Return

func (*MockClient_ListKeys_Call) Run

func (*MockClient_ListKeys_Call) RunAndReturn

type MockKMS

type MockKMS struct {
	mock.Mock
}

MockKMS is an autogenerated mock type for the KMS type

func NewMockKMS

func NewMockKMS(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockKMS

NewMockKMS creates a new instance of MockKMS. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockKMS) DescribeSymmetricKeys

func (_m *MockKMS) DescribeSymmetricKeys(ctx context.Context) ([]awslib.AwsResource, error)

DescribeSymmetricKeys provides a mock function with given fields: ctx

func (*MockKMS) EXPECT

func (_m *MockKMS) EXPECT() *MockKMS_Expecter

type MockKMS_DescribeSymmetricKeys_Call

type MockKMS_DescribeSymmetricKeys_Call struct {
	*mock.Call
}

MockKMS_DescribeSymmetricKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSymmetricKeys'

func (*MockKMS_DescribeSymmetricKeys_Call) Return

func (*MockKMS_DescribeSymmetricKeys_Call) Run

func (*MockKMS_DescribeSymmetricKeys_Call) RunAndReturn

type MockKMS_Expecter

type MockKMS_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockKMS_Expecter) DescribeSymmetricKeys

func (_e *MockKMS_Expecter) DescribeSymmetricKeys(ctx interface{}) *MockKMS_DescribeSymmetricKeys_Call

DescribeSymmetricKeys is a helper method to define mock.On call

  • ctx context.Context

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewKMSProvider

func NewKMSProvider(log *logp.Logger, cfg aws.Config, factory awslib.CrossRegionFactory[Client]) *Provider

func (*Provider) DescribeSymmetricKeys

func (p *Provider) DescribeSymmetricKeys(ctx context.Context) ([]awslib.AwsResource, error)

Jump to

Keyboard shortcuts

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