aws

package
v0.0.0-...-877ff3d Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

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 is AWS KMS client

func NewKMS

func NewKMS(keyID string) (*KMS, error)

NewKMS returns new AWS KMS client It returns error if the keyID is invalid AWS KMS key id

func NewKMSWithSession

func NewKMSWithSession(sess *session.Session, keyID string) (*KMS, error)

NewKMSWithSession creates new AWS KMS client with session sess It returns error if the keyID is invalid AWS KMS key id

func (*KMS) Decrypt

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

Decrypt decrypts cipherText data and returns it

func (*KMS) Encrypt

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

Encrypt encrypts plainText data and returns it

type S3

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

S3 is AWS S3 client

func NewS3

func NewS3(bucket, key string) (*S3, error)

NewS3 returns new AWS S3 client

func NewS3WithSession

func NewS3WithSession(bucket, key string, sess *session.Session) (*S3, error)

NewS3WithSession creates new AWS S3 client with session sess

func (*S3) Read

func (s *S3) Read(data []byte) (int, error)

Read reads data from S3 bucket

func (*S3) Write

func (s *S3) Write(data []byte) (int, error)

Write writes data to S3 bucket

Jump to

Keyboard shortcuts

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