env_loader

package
v0.0.0-...-982e07a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvKeyEncryptorFabric

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

EnvKeyEncryptorFabric implementation of keyloader.KeyEncryptorFabric for `env_master_key` strategy

func NewEnvKeyEncryptorFabric

func NewEnvKeyEncryptorFabric(envName string) EnvKeyEncryptorFabric

NewEnvKeyEncryptorFabric create new KeyEncryptorFabric

func (EnvKeyEncryptorFabric) GetKeyMapper

func (k EnvKeyEncryptorFabric) GetKeyMapper() baseKMS.KeyMapper

GetKeyMapper return KeyMapper for `env_master_key` strategy

func (EnvKeyEncryptorFabric) NewKeyEncryptor

func (k EnvKeyEncryptorFabric) NewKeyEncryptor(extractor *args.ServiceExtractor, prefix string) (keystore.KeyEncryptor, error)

NewKeyEncryptor fabric of keystore.KeyEncryptor for `env_master_key` strategy

func (EnvKeyEncryptorFabric) NewKeyEncryptorSuite

func (k EnvKeyEncryptorFabric) NewKeyEncryptorSuite(extractor *args.ServiceExtractor, prefix string) (*crypto.KeyStoreSuite, error)

NewKeyEncryptorSuite fabric of crypto.KeyStoreSuite for `env_master_key` strategy

func (EnvKeyEncryptorFabric) RegisterCLIParameters

func (k EnvKeyEncryptorFabric) RegisterCLIParameters(flags *flag.FlagSet, prefix, description string)

RegisterCLIParameters empty implementation of KeyEncryptorFabric interface

type EnvLoader

type EnvLoader struct {
	MasterKeyEnv string
}

EnvLoader unifying structure for implementation env MasterKeyLoader

func NewEnvLoader

func NewEnvLoader(env string) EnvLoader

NewEnvLoader return key loader using env variable

func (EnvLoader) LoadMasterKey

func (e EnvLoader) LoadMasterKey() (key []byte, err error)

LoadMasterKey retrieve ACRA_MASTER_KEY from env variable and validate it

func (EnvLoader) LoadMasterKeys

func (e EnvLoader) LoadMasterKeys() ([]byte, []byte, error)

LoadMasterKeys retrieve ACRA_MASTER_KEY from env variable, deserialize and validate it

Jump to

Keyboard shortcuts

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