gcp

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrProjectMissing - this is the custom error, returned when project is missing
	ErrProjectMissing = errors.New("project is empty or missing")
	// ErrLocationMissing = this is the custom error, returned when the location is missing
	ErrLocationMissing = errors.New("location is empty or missing")
	// ErrKeyRingMissing = this is the custom error, returned when the key ring is missing
	ErrKeyRingMissing = errors.New("key ring is empty or missing")
	// ErrKeyMissing = this is the custom error, returned when the key is missing
	ErrKeyMissing = errors.New("key is empty or missing")
)

Functions

This section is empty.

Types

type KMS added in v0.0.4

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

KMS provides a way to encrypt and decrypt the data using GCP KMS.

func New added in v0.0.4

func New(project, location, keyring, key string) *KMS

New new GCP KMS

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 GCP KMS. See Crypt.DecryptFile

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 GCP KMS. See Crypt.Encrypt

Jump to

Keyboard shortcuts

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