aws

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultProfile is the default profile to be used when loading configuration
	// from the config files if another profile name is not provided.
	DefaultProfile = session.DefaultSharedConfigProfile
)

Variables

View Source
var (
	// ErrKmsMissing - this is the custom error, returned when name, alias or arn is missing
	ErrKmsMissing = errors.New("kms is empty or missing")
	// ErrRegionMissing - this is the custom error, returned when the region is missing
	ErrRegionMissing = errors.New("region is empty or missing")
)

Functions

func SessionConfig added in v0.2.5

func SessionConfig(region, profile string) (*session.Session, *aws.Config, error)

SessionConfig returns AWS API client session and config with given region and profile

Types

type KMS

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

KMS struct represents AWS Key Management Service

func New added in v0.0.4

func New(key, region, profile string) *KMS

New creates a AWS KMS provider

func (*KMS) Decrypt added in v0.0.4

func (k *KMS) Decrypt(ciphertext []byte) ([]byte, error)

Decrypt is responsible for decrypting ciphertext and returning plaintext in bytes using AWS KMS. See Crypt.Decrypt

func (*KMS) Encrypt added in v0.0.4

func (k *KMS) Encrypt(plaintext []byte) ([]byte, error)

Encrypt is responsible for encrypting plaintext and returning ciphertext in bytes using AWS KMS. See Crypt.Encrypt

Jump to

Keyboard shortcuts

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