kms

package
v1.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMS

type KMS struct {
	// contains filtered or unexported fields
}

KMS has KMS client.

func New

func New(conf config.Config) (*KMS, error)

New returns initialized *Rekognition.

func NewFromSession added in v1.17.0

func NewFromSession(sess *session.Session) *KMS

NewFromSession returns initialized *KMS from aws.Session.

func (*KMS) CreateAlias

func (svc *KMS) CreateAlias(keyID, aliasName string) error

CreateAlias executes CreateAlias operation.

func (*KMS) CreateKey

func (svc *KMS) CreateKey(tags ...Tag) (*SDK.KeyMetadata, error)

CreateKey executes CreateKey operation.

func (*KMS) CreateKeyWithAlias

func (svc *KMS) CreateKeyWithAlias(aliasName string, tags ...Tag) (*SDK.KeyMetadata, error)

CreateKeyWithAlias creates a key and sets alias name.

func (*KMS) Decrypt

func (svc *KMS) Decrypt(encryptedData []byte) (plainData []byte, err error)

Decrypt executes Decrypt operation.

func (*KMS) DecryptString

func (svc *KMS) DecryptString(base64Text string) (plainText string, err error)

DecryptString executes Decrypt operation with base64 string.

func (*KMS) DeleteKey

func (svc *KMS) DeleteKey(keyName string, day int) error

DeleteKey executes ScheduleKeyDeletion operation from Key name(key id, arn or alias).

func (*KMS) DescribeKey

func (svc *KMS) DescribeKey(keyName string) (metaData *SDK.KeyMetadata, err error)

DescribeKey executes DescribeKey operation.

func (*KMS) Encrypt

func (svc *KMS) Encrypt(keyName string, plainData []byte) (encryptedData []byte, err error)

Encrypt executes Encrypt operation.

func (*KMS) EncryptString

func (svc *KMS) EncryptString(keyName, plainText string) (base64Text string, err error)

EncryptString executes Encrypt operation with base64 string.

func (*KMS) Errorf

func (svc *KMS) Errorf(format string, v ...interface{})

Errorf logging error information.

func (*KMS) GetClient added in v1.17.1

func (svc *KMS) GetClient() *SDK.KMS

GetClient gets aws client.

func (*KMS) Infof

func (svc *KMS) Infof(format string, v ...interface{})

Infof logging information.

func (*KMS) ReEncrypt

func (svc *KMS) ReEncrypt(destinationKey string, encryptedData []byte) (resultEncryptedData []byte, err error)

ReEncrypt executes ReEncrypt operation.

func (*KMS) ReEncryptString

func (svc *KMS) ReEncryptString(destinationKey, base64Text string) (resultBase64Text string, err error)

ReEncryptString executes ReEncrypt operation with base64 string.

func (*KMS) ScheduleKeyDeletion

func (svc *KMS) ScheduleKeyDeletion(keyID string, day int) error

ScheduleKeyDeletion executes ScheduleKeyDeletion operation.

func (*KMS) SetLogger

func (svc *KMS) SetLogger(logger log.Logger)

SetLogger sets logger.

type Tag

type Tag struct {
	Key   string
	Value string
}

Tag is key-value data struct.

func (Tag) Tag

func (t Tag) Tag() *SDK.Tag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL