Documentation
¶
Overview ¶
gokms - Go packages to interact with Amazon KMS (Key Management Service)
Written by Kiko Hsieh <kiko_hsieh@trend.com.tw>
Index ¶
- type AliasInfo
- type DecryptInfo
- type DecryptResp
- type DescribeKeyInfo
- type DescribeKeyResp
- type DisableKeyInfo
- type EnableKeyInfo
- type EncryptInfo
- type EncryptResp
- type KMS
- func (k *KMS) Decrypt(info DecryptInfo) (DecryptResp, error)
- func (k *KMS) DescribeKey(info DescribeKeyInfo) (DescribeKeyResp, error)
- func (k *KMS) DisableKey(info DisableKeyInfo) error
- func (k *KMS) EnableKey(info EnableKeyInfo) error
- func (k *KMS) Encrypt(info EncryptInfo) (EncryptResp, error)
- func (k *KMS) ListAliases(info ListAliasesInfo) (ListAliasesResp, error)
- type KMSAction
- type KMSError
- type ListAliasesInfo
- type ListAliasesResp
- type ProduceKeyOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecryptInfo ¶
type DecryptInfo struct { CiphertextBlob []byte ProduceKeyOpt }
func (*DecryptInfo) ActionName ¶
func (d *DecryptInfo) ActionName() string
type DecryptResp ¶
type DescribeKeyInfo ¶
type DescribeKeyInfo struct { //4 forms for KeyId - http://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html //1. Key ARN //2. Alias ARN //3. Globally Unique Key //4. Alias Name KeyId string }
The following structs are the parameters when requesting to AWS KMS http://docs.aws.amazon.com/kms/latest/APIReference/API_Operations.html
func (*DescribeKeyInfo) ActionName ¶
func (d *DescribeKeyInfo) ActionName() string
type DescribeKeyResp ¶
type DescribeKeyResp struct { KeyMetadata struct { AWSAccountId string Arn string CreationDate float64 Description string Enabled bool KeyId string KeyUsage string } }
The rersponse body from KMS, based on which action you take http://docs.aws.amazon.com/kms/latest/APIReference/API_Operations.html
type DisableKeyInfo ¶
type DisableKeyInfo struct { //2 forms for KeyId - http://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html //1. Key ARN //2. Globally Unique KeyId KeyId string }
func (*DisableKeyInfo) ActionName ¶
func (d *DisableKeyInfo) ActionName() string
type EnableKeyInfo ¶
type EnableKeyInfo struct { //2 forms for KeyId - http://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html //1. Key ARN //2. Globally Unique Key KeyId string }
func (*EnableKeyInfo) ActionName ¶
func (e *EnableKeyInfo) ActionName() string
type EncryptInfo ¶
type EncryptInfo struct { //4 forms for KeyId - http://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html //1. Key ARN //2. Alias ARN //3. Globally Unique Key //4. Alias Name KeyId string ProduceKeyOpt Plaintext []byte }
func (*EncryptInfo) ActionName ¶
func (e *EncryptInfo) ActionName() string
type EncryptResp ¶
type KMS ¶
func (*KMS) Decrypt ¶
func (k *KMS) Decrypt(info DecryptInfo) (DecryptResp, error)
func (*KMS) DescribeKey ¶
func (k *KMS) DescribeKey(info DescribeKeyInfo) (DescribeKeyResp, error)
func (*KMS) DisableKey ¶
func (k *KMS) DisableKey(info DisableKeyInfo) error
func (*KMS) EnableKey ¶
func (k *KMS) EnableKey(info EnableKeyInfo) error
func (*KMS) Encrypt ¶
func (k *KMS) Encrypt(info EncryptInfo) (EncryptResp, error)
func (*KMS) ListAliases ¶
func (k *KMS) ListAliases(info ListAliasesInfo) (ListAliasesResp, error)
type KMSError ¶
type ListAliasesInfo ¶
type ListAliasesInfo struct { //These parameters are optional. See http://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html Limit int `json:",omitempty"` Marker string `json:",omitempty"` }
func (*ListAliasesInfo) ActionName ¶
func (l *ListAliasesInfo) ActionName() string
type ListAliasesResp ¶
type ProduceKeyOpt ¶
Click to show internal directories.
Click to hide internal directories.