kms

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrCode

func ErrCode(msg string, err error) error

Types

type KMS

type KMS struct {
	Service *kms.KMS
	// contains filtered or unexported fields
}

KMS is a wrapper around the aws KMS service with some default config info

func New

func New(opts ...KMSOption) KMS

func NewSession

func NewSession(account common.Account) KMS

NewSession creates a new KMS session

func (*KMS) GetKmsKeyId

func (k *KMS) GetKmsKeyId(ctx context.Context, aliasName string) (string, error)

func (*KMS) GetKmsKeyIdByTags

func (k *KMS) GetKmsKeyIdByTags(ctx context.Context, inputTags []string, org string) (string, error)

GetKmsKeyIdByTags Get the required kms key id for the account by its tags

func (*KMS) GetKmsKeyTags

func (k *KMS) GetKmsKeyTags(ctx context.Context, keyId string) ([]*kms.Tag, error)

GetKmsKeyTags get the kms key tags for a specific kms key id

func (*KMS) ListKmsKeyIds

func (k *KMS) ListKmsKeyIds(ctx context.Context) ([]string, error)

ListKmsKeyIds fetch the kms key ids for an account

type KMSOption

type KMSOption func(*KMS)

func WithCredentials

func WithCredentials(key, secret, token, region string) KMSOption

func WithSession

func WithSession(sess *session.Session) KMSOption

Jump to

Keyboard shortcuts

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