backend

package
v0.2.1-0...-c27fdce Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyBackend

type KeyBackend interface {
	Store(key string, payload []byte) (bool, error)
	Read(key string) ([]byte, error)
}

type KmsBackend

type KmsBackend struct {
	KmsKeyId      string
	GcsBucketName string
	KmsService    *cloudkms.Service
	StorageClient *storage.Client
}

func NewKmsBackend

func NewKmsBackend(kmsKey string, gcsBucketName string) (*KmsBackend, error)

func (*KmsBackend) Read

func (k *KmsBackend) Read(key string) ([]byte, error)

func (*KmsBackend) Store

func (k *KmsBackend) Store(key string, payload []byte) (bool, error)

type SecretsManagerBackend

type SecretsManagerBackend struct {
	Context   *context.Context
	ProjectId string
	Client    *secretmanager.Client
}

func NewSecretsManagerBackend

func NewSecretsManagerBackend(projectid string) (*SecretsManagerBackend, error)

func (*SecretsManagerBackend) Read

func (s *SecretsManagerBackend) Read(key string) ([]byte, error)

func (*SecretsManagerBackend) Store

func (s *SecretsManagerBackend) Store(key string, payload []byte) (bool, error)

Jump to

Keyboard shortcuts

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