Documentation ¶
Overview ¶
Package aws is a generated GoMock package.
Index ¶
- func NewSuite(awsConfig *aws.Config, metrics metricsProvider, healthCheckKeyID string, ...) api.Suite
- type MockawsClient
- func (m *MockawsClient) CreateAlias(ctx context.Context, params *kms.CreateAliasInput, ...) (*kms.CreateAliasOutput, error)
- func (m *MockawsClient) CreateKey(ctx context.Context, params *kms.CreateKeyInput, optFns ...func(*kms.Options)) (*kms.CreateKeyOutput, error)
- func (m *MockawsClient) Decrypt(ctx context.Context, params *kms.DecryptInput, optFns ...func(*kms.Options)) (*kms.DecryptOutput, error)
- func (m *MockawsClient) DescribeKey(ctx context.Context, params *kms.DescribeKeyInput, ...) (*kms.DescribeKeyOutput, error)
- func (m *MockawsClient) EXPECT() *MockawsClientMockRecorder
- func (m *MockawsClient) Encrypt(ctx context.Context, params *kms.EncryptInput, optFns ...func(*kms.Options)) (*kms.EncryptOutput, error)
- func (m *MockawsClient) GetPublicKey(ctx context.Context, params *kms.GetPublicKeyInput, ...) (*kms.GetPublicKeyOutput, error)
- func (m *MockawsClient) ScheduleKeyDeletion(ctx context.Context, params *kms.ScheduleKeyDeletionInput, ...) (*kms.ScheduleKeyDeletionOutput, error)
- func (m *MockawsClient) Sign(ctx context.Context, params *kms.SignInput, optFns ...func(*kms.Options)) (*kms.SignOutput, error)
- func (m *MockawsClient) Verify(ctx context.Context, params *kms.VerifyInput, optFns ...func(*kms.Options)) (*kms.VerifyOutput, error)
- type MockawsClientMockRecorder
- func (mr *MockawsClientMockRecorder) CreateAlias(ctx, params interface{}, optFns ...interface{}) *awsClientCreateAliasCall
- func (mr *MockawsClientMockRecorder) CreateKey(ctx, params interface{}, optFns ...interface{}) *awsClientCreateKeyCall
- func (mr *MockawsClientMockRecorder) Decrypt(ctx, params interface{}, optFns ...interface{}) *awsClientDecryptCall
- func (mr *MockawsClientMockRecorder) DescribeKey(ctx, params interface{}, optFns ...interface{}) *awsClientDescribeKeyCall
- func (mr *MockawsClientMockRecorder) Encrypt(ctx, params interface{}, optFns ...interface{}) *awsClientEncryptCall
- func (mr *MockawsClientMockRecorder) GetPublicKey(ctx, params interface{}, optFns ...interface{}) *awsClientGetPublicKeyCall
- func (mr *MockawsClientMockRecorder) ScheduleKeyDeletion(ctx, params interface{}, optFns ...interface{}) *awsClientScheduleKeyDeletionCall
- func (mr *MockawsClientMockRecorder) Sign(ctx, params interface{}, optFns ...interface{}) *awsClientSignCall
- func (mr *MockawsClientMockRecorder) Verify(ctx, params interface{}, optFns ...interface{}) *awsClientVerifyCall
- type MockmetricsProvider
- func (m *MockmetricsProvider) DecryptCount()
- func (m *MockmetricsProvider) DecryptTime(value time.Duration)
- func (m *MockmetricsProvider) EXPECT() *MockmetricsProviderMockRecorder
- func (m *MockmetricsProvider) EncryptCount()
- func (m *MockmetricsProvider) EncryptTime(value time.Duration)
- func (m *MockmetricsProvider) ExportPublicKeyCount()
- func (m *MockmetricsProvider) ExportPublicKeyTime(value time.Duration)
- func (m *MockmetricsProvider) SignCount()
- func (m *MockmetricsProvider) SignTime(value time.Duration)
- func (m *MockmetricsProvider) VerifyCount()
- func (m *MockmetricsProvider) VerifyTime(value time.Duration)
- type MockmetricsProviderMockRecorder
- func (mr *MockmetricsProviderMockRecorder) DecryptCount() *metricsProviderDecryptCountCall
- func (mr *MockmetricsProviderMockRecorder) DecryptTime(value interface{}) *metricsProviderDecryptTimeCall
- func (mr *MockmetricsProviderMockRecorder) EncryptCount() *metricsProviderEncryptCountCall
- func (mr *MockmetricsProviderMockRecorder) EncryptTime(value interface{}) *metricsProviderEncryptTimeCall
- func (mr *MockmetricsProviderMockRecorder) ExportPublicKeyCount() *metricsProviderExportPublicKeyCountCall
- func (mr *MockmetricsProviderMockRecorder) ExportPublicKeyTime(value interface{}) *metricsProviderExportPublicKeyTimeCall
- func (mr *MockmetricsProviderMockRecorder) SignCount() *metricsProviderSignCountCall
- func (mr *MockmetricsProviderMockRecorder) SignTime(value interface{}) *metricsProviderSignTimeCall
- func (mr *MockmetricsProviderMockRecorder) VerifyCount() *metricsProviderVerifyCountCall
- func (mr *MockmetricsProviderMockRecorder) VerifyTime(value interface{}) *metricsProviderVerifyTimeCall
- type Opts
- type Service
- func (s *Service) Create(kt arieskms.KeyType) (string, interface{}, error)
- func (s *Service) CreateAndExportPubKeyBytes(kt arieskms.KeyType, _ ...arieskms.KeyOpts) (string, []byte, error)
- func (s *Service) Decrypt(cipher, _, _ []byte, kh interface{}) ([]byte, error)
- func (s *Service) Encrypt(msg []byte, _ []byte, kh interface{}) ([]byte, []byte, error)
- func (s *Service) ExportPubKeyBytes(keyURI string) ([]byte, arieskms.KeyType, error)
- func (s *Service) Get(keyID string) (interface{}, error)
- func (s *Service) HealthCheck() error
- func (s *Service) ImportPrivateKey(_ interface{}, _ arieskms.KeyType, _ ...arieskms.PrivateKeyOpts) (string, interface{}, error)
- func (s *Service) Remove(keyURI string) error
- func (s *Service) Sign(msg []byte, kh interface{}) ([]byte, error)
- func (s *Service) SignMulti(_ [][]byte, _ interface{}) ([]byte, error)
- func (s *Service) Verify(_, _ []byte, _ interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockawsClient ¶
type MockawsClient struct {
// contains filtered or unexported fields
}
MockawsClient is a mock of awsClient interface.
func NewMockawsClient ¶
func NewMockawsClient(ctrl *gomock.Controller) *MockawsClient
NewMockawsClient creates a new mock instance.
func (*MockawsClient) CreateAlias ¶
func (m *MockawsClient) CreateAlias(ctx context.Context, params *kms.CreateAliasInput, optFns ...func(*kms.Options)) (*kms.CreateAliasOutput, error)
CreateAlias mocks base method.
func (*MockawsClient) CreateKey ¶
func (m *MockawsClient) CreateKey(ctx context.Context, params *kms.CreateKeyInput, optFns ...func(*kms.Options)) (*kms.CreateKeyOutput, error)
CreateKey mocks base method.
func (*MockawsClient) Decrypt ¶
func (m *MockawsClient) Decrypt(ctx context.Context, params *kms.DecryptInput, optFns ...func(*kms.Options)) (*kms.DecryptOutput, error)
Decrypt mocks base method.
func (*MockawsClient) DescribeKey ¶
func (m *MockawsClient) DescribeKey(ctx context.Context, params *kms.DescribeKeyInput, optFns ...func(*kms.Options)) (*kms.DescribeKeyOutput, error)
DescribeKey mocks base method.
func (*MockawsClient) EXPECT ¶
func (m *MockawsClient) EXPECT() *MockawsClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockawsClient) Encrypt ¶
func (m *MockawsClient) Encrypt(ctx context.Context, params *kms.EncryptInput, optFns ...func(*kms.Options)) (*kms.EncryptOutput, error)
Encrypt mocks base method.
func (*MockawsClient) GetPublicKey ¶
func (m *MockawsClient) GetPublicKey(ctx context.Context, params *kms.GetPublicKeyInput, optFns ...func(*kms.Options)) (*kms.GetPublicKeyOutput, error)
GetPublicKey mocks base method.
func (*MockawsClient) ScheduleKeyDeletion ¶ added in v1.10.0
func (m *MockawsClient) ScheduleKeyDeletion(ctx context.Context, params *kms.ScheduleKeyDeletionInput, optFns ...func(*kms.Options)) (*kms.ScheduleKeyDeletionOutput, error)
ScheduleKeyDeletion mocks base method.
func (*MockawsClient) Sign ¶
func (m *MockawsClient) Sign(ctx context.Context, params *kms.SignInput, optFns ...func(*kms.Options)) (*kms.SignOutput, error)
Sign mocks base method.
func (*MockawsClient) Verify ¶
func (m *MockawsClient) Verify(ctx context.Context, params *kms.VerifyInput, optFns ...func(*kms.Options)) (*kms.VerifyOutput, error)
Verify mocks base method.
type MockawsClientMockRecorder ¶
type MockawsClientMockRecorder struct {
// contains filtered or unexported fields
}
MockawsClientMockRecorder is the mock recorder for MockawsClient.
func (*MockawsClientMockRecorder) CreateAlias ¶
func (mr *MockawsClientMockRecorder) CreateAlias(ctx, params interface{}, optFns ...interface{}) *awsClientCreateAliasCall
CreateAlias indicates an expected call of CreateAlias.
func (*MockawsClientMockRecorder) CreateKey ¶
func (mr *MockawsClientMockRecorder) CreateKey(ctx, params interface{}, optFns ...interface{}) *awsClientCreateKeyCall
CreateKey indicates an expected call of CreateKey.
func (*MockawsClientMockRecorder) Decrypt ¶
func (mr *MockawsClientMockRecorder) Decrypt(ctx, params interface{}, optFns ...interface{}) *awsClientDecryptCall
Decrypt indicates an expected call of Decrypt.
func (*MockawsClientMockRecorder) DescribeKey ¶
func (mr *MockawsClientMockRecorder) DescribeKey(ctx, params interface{}, optFns ...interface{}) *awsClientDescribeKeyCall
DescribeKey indicates an expected call of DescribeKey.
func (*MockawsClientMockRecorder) Encrypt ¶
func (mr *MockawsClientMockRecorder) Encrypt(ctx, params interface{}, optFns ...interface{}) *awsClientEncryptCall
Encrypt indicates an expected call of Encrypt.
func (*MockawsClientMockRecorder) GetPublicKey ¶
func (mr *MockawsClientMockRecorder) GetPublicKey(ctx, params interface{}, optFns ...interface{}) *awsClientGetPublicKeyCall
GetPublicKey indicates an expected call of GetPublicKey.
func (*MockawsClientMockRecorder) ScheduleKeyDeletion ¶ added in v1.10.0
func (mr *MockawsClientMockRecorder) ScheduleKeyDeletion(ctx, params interface{}, optFns ...interface{}) *awsClientScheduleKeyDeletionCall
ScheduleKeyDeletion indicates an expected call of ScheduleKeyDeletion.
func (*MockawsClientMockRecorder) Sign ¶
func (mr *MockawsClientMockRecorder) Sign(ctx, params interface{}, optFns ...interface{}) *awsClientSignCall
Sign indicates an expected call of Sign.
func (*MockawsClientMockRecorder) Verify ¶
func (mr *MockawsClientMockRecorder) Verify(ctx, params interface{}, optFns ...interface{}) *awsClientVerifyCall
Verify indicates an expected call of Verify.
type MockmetricsProvider ¶
type MockmetricsProvider struct {
// contains filtered or unexported fields
}
MockmetricsProvider is a mock of metricsProvider interface.
func NewMockmetricsProvider ¶
func NewMockmetricsProvider(ctrl *gomock.Controller) *MockmetricsProvider
NewMockmetricsProvider creates a new mock instance.
func (*MockmetricsProvider) DecryptCount ¶
func (m *MockmetricsProvider) DecryptCount()
DecryptCount mocks base method.
func (*MockmetricsProvider) DecryptTime ¶
func (m *MockmetricsProvider) DecryptTime(value time.Duration)
DecryptTime mocks base method.
func (*MockmetricsProvider) EXPECT ¶
func (m *MockmetricsProvider) EXPECT() *MockmetricsProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockmetricsProvider) EncryptCount ¶
func (m *MockmetricsProvider) EncryptCount()
EncryptCount mocks base method.
func (*MockmetricsProvider) EncryptTime ¶
func (m *MockmetricsProvider) EncryptTime(value time.Duration)
EncryptTime mocks base method.
func (*MockmetricsProvider) ExportPublicKeyCount ¶
func (m *MockmetricsProvider) ExportPublicKeyCount()
ExportPublicKeyCount mocks base method.
func (*MockmetricsProvider) ExportPublicKeyTime ¶
func (m *MockmetricsProvider) ExportPublicKeyTime(value time.Duration)
ExportPublicKeyTime mocks base method.
func (*MockmetricsProvider) SignCount ¶
func (m *MockmetricsProvider) SignCount()
SignCount mocks base method.
func (*MockmetricsProvider) SignTime ¶
func (m *MockmetricsProvider) SignTime(value time.Duration)
SignTime mocks base method.
func (*MockmetricsProvider) VerifyCount ¶
func (m *MockmetricsProvider) VerifyCount()
VerifyCount mocks base method.
func (*MockmetricsProvider) VerifyTime ¶
func (m *MockmetricsProvider) VerifyTime(value time.Duration)
VerifyTime mocks base method.
type MockmetricsProviderMockRecorder ¶
type MockmetricsProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockmetricsProviderMockRecorder is the mock recorder for MockmetricsProvider.
func (*MockmetricsProviderMockRecorder) DecryptCount ¶
func (mr *MockmetricsProviderMockRecorder) DecryptCount() *metricsProviderDecryptCountCall
DecryptCount indicates an expected call of DecryptCount.
func (*MockmetricsProviderMockRecorder) DecryptTime ¶
func (mr *MockmetricsProviderMockRecorder) DecryptTime(value interface{}) *metricsProviderDecryptTimeCall
DecryptTime indicates an expected call of DecryptTime.
func (*MockmetricsProviderMockRecorder) EncryptCount ¶
func (mr *MockmetricsProviderMockRecorder) EncryptCount() *metricsProviderEncryptCountCall
EncryptCount indicates an expected call of EncryptCount.
func (*MockmetricsProviderMockRecorder) EncryptTime ¶
func (mr *MockmetricsProviderMockRecorder) EncryptTime(value interface{}) *metricsProviderEncryptTimeCall
EncryptTime indicates an expected call of EncryptTime.
func (*MockmetricsProviderMockRecorder) ExportPublicKeyCount ¶
func (mr *MockmetricsProviderMockRecorder) ExportPublicKeyCount() *metricsProviderExportPublicKeyCountCall
ExportPublicKeyCount indicates an expected call of ExportPublicKeyCount.
func (*MockmetricsProviderMockRecorder) ExportPublicKeyTime ¶
func (mr *MockmetricsProviderMockRecorder) ExportPublicKeyTime(value interface{}) *metricsProviderExportPublicKeyTimeCall
ExportPublicKeyTime indicates an expected call of ExportPublicKeyTime.
func (*MockmetricsProviderMockRecorder) SignCount ¶
func (mr *MockmetricsProviderMockRecorder) SignCount() *metricsProviderSignCountCall
SignCount indicates an expected call of SignCount.
func (*MockmetricsProviderMockRecorder) SignTime ¶
func (mr *MockmetricsProviderMockRecorder) SignTime(value interface{}) *metricsProviderSignTimeCall
SignTime indicates an expected call of SignTime.
func (*MockmetricsProviderMockRecorder) VerifyCount ¶
func (mr *MockmetricsProviderMockRecorder) VerifyCount() *metricsProviderVerifyCountCall
VerifyCount indicates an expected call of VerifyCount.
func (*MockmetricsProviderMockRecorder) VerifyTime ¶
func (mr *MockmetricsProviderMockRecorder) VerifyTime(value interface{}) *metricsProviderVerifyTimeCall
VerifyTime indicates an expected call of VerifyTime.
type Opts ¶
type Opts func(opts *opts)
Opts a Functional Options.
func WithAWSClient ¶
func WithAWSClient(client awsClient) Opts
WithAWSClient sets custom AWS client.
func WithAWSEndpointResolverV2 ¶ added in v1.11.0
func WithAWSEndpointResolverV2(resolver kms.EndpointResolverV2) Opts
func WithEncryptionAlgorithm ¶
WithEncryptionAlgorithm sets the encryption\decryption algorithm Opts.
func WithKeyAliasPrefix ¶
WithKeyAliasPrefix sets the given prefix in the returns Opts.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service aws kms.
func New ¶
func New( awsConfig *aws.Config, metrics metricsProvider, healthCheckKeyID string, opts ...Opts, ) *Service
New return aws service.
func (*Service) CreateAndExportPubKeyBytes ¶
func (s *Service) CreateAndExportPubKeyBytes(kt arieskms.KeyType, _ ...arieskms.KeyOpts) (string, []byte, error)
CreateAndExportPubKeyBytes create and export key.
func (*Service) ExportPubKeyBytes ¶
ExportPubKeyBytes export public key.
func (*Service) ImportPrivateKey ¶
func (s *Service) ImportPrivateKey(_ interface{}, _ arieskms.KeyType, _ ...arieskms.PrivateKeyOpts) (string, interface{}, error)
ImportPrivateKey private key.