gcp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Project - this is constant used in params
	Project = "project"
	// Location - this is constant used in params
	Location = "location"
	// KeyRing - this is constant used in params
	KeyRing = "keyring"
	// Key - this is constant used in params
	Key = "key"
)

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 GoogleKMS

type GoogleKMS struct{}

GoogleKMS struct represents GCP Key Management Service

func NewGoogleKMS

func NewGoogleKMS() *GoogleKMS

NewGoogleKMS new GCP KMS

func (*GoogleKMS) Decrypt

func (g *GoogleKMS) Decrypt(ciphertext []byte, params map[string]interface{}) ([]byte, error)

Decrypt is responsible for decrypting ciphertext and returning plaintext in bytes using GCP KMS. All configuration is passed in params with according validation. See Crypt.DecryptFile

func (*GoogleKMS) Encrypt

func (g *GoogleKMS) Encrypt(plaintext []byte, params map[string]interface{}) ([]byte, error)

Encrypt is responsible for encrypting plaintext and returning ciphertext in bytes using GCP KMS. All configuration is passed in params with according validation. See Crypt.EncryptFile

Jump to

Keyboard shortcuts

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