diff options
Diffstat (limited to 'aws/kms.go')
| -rw-r--r-- | aws/kms.go | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -6,12 +6,18 @@ import ( "github.com/aws/aws-sdk-go/service/kms" ) -// KMS - +// KMSAPI is a subset of kmsiface.KMSAPI +type KMSAPI interface { + Encrypt(input *kms.EncryptInput) (*kms.EncryptOutput, error) + Decrypt(input *kms.DecryptInput) (*kms.DecryptOutput, error) +} + +// KMS is an AWS KMS client type KMS struct { - Client *kms.KMS + Client KMSAPI } -// NewKMS - Create new KMS client +// NewKMS - Create new AWS KMS client using an SDKSession func NewKMS(option ClientOptions) *KMS { client := kms.New(SDKSession()) return &KMS{ |
