Documentation
¶
Index ¶
- func Decrypt(ctx context.Context, data []byte, name string, dataKey []byte) (string, error)
- func Encrypt(ctx context.Context, data, name string, dataKey []byte) ([]byte, error)
- func NewConfig(ctx context.Context, o NewConfigOptions) (aws.Config, error)
- func NewS3Client(ctx context.Context, o NewS3ClientOptions) (*s3.Client, error)
- type AssumeRole
- type KMSClient
- type MockKMSClient
- type NewConfigOptions
- type NewS3ClientOptions
- type Secret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewS3Client ¶
NewS3Client returns a new S3 client.
Types ¶
type AssumeRole ¶
AssumeRole is the options for AssumeRole.
type KMSClient ¶ added in v0.11.0
type KMSClient struct {
// contains filtered or unexported fields
}
KMSClient maintains the client to access AWS KMS related service.
func NewKMSClient ¶ added in v0.11.0
NewKMSClient construct a KMS client.
func (*KMSClient) CreateDataKey ¶ added in v0.11.0
CreateDataKey creates a data key with KMS master key.
type MockKMSClient ¶ added in v0.11.0
type MockKMSClient struct {
// DataKey is the data key used for testing. It is exposed,
// in case the test needs to refer/overwrite it.
DataKey []byte
}
MockKMSClient is a mock implementation of KMSClient.
func NewMockKMSClient ¶ added in v0.11.0
func NewMockKMSClient() *MockKMSClient
NewMockKMSClient creates a new MockClient with a default data key.
func (*MockKMSClient) CreateDataKey ¶ added in v0.11.0
CreateDataKey implements a DataKeyManagementClient method.
func (*MockKMSClient) DecryptDataKey ¶ added in v0.11.0
DecryptDataKey implements a DataKeyManagementClient method.
type NewConfigOptions ¶ added in v0.11.0
type NewConfigOptions struct {
Region string
UseAnonymousCredentials bool
AssumeRole *AssumeRole
Secret *Secret
InsecureSkipVerify bool
}
NewConfigOptions is the configuration options.
type NewS3ClientOptions ¶
type NewS3ClientOptions struct {
EndpointURL string
Region string
UseAnonymousCredentials bool
AssumeRole *AssumeRole
Secret *Secret
InsecureSkipVerify bool
}
NewS3ClientOptions is the options for NewS3Client.
Click to show internal directories.
Click to hide internal directories.