package kms
import "github.com/AdRoll/goamz/kms"
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 New(auth aws.Auth, region aws.Region) *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
Types ¶
type AliasInfo ¶
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 New ¶
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 KMSAction ¶
type KMSAction interface { ActionName() string }
type KMSError ¶
type KMSError struct { StatusCode int `json:",omitempty"` Type string `json:"__type"` Message string `json:"message"` }
func (*KMSError) Error ¶
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 ¶
type ProduceKeyOpt struct { EncryptionContext map[string]string `json:",omitempty"` GrantTokens []string `json:",omitempty"` }
Source Files ¶
kms.go requestStruct.go responseStruct.go
- Version
- v0.0.0-20170825154802-2731d20f46f4 (latest)
- Published
- Aug 25, 2017
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 5 days ago –
Tools for package owners.