Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Name is the Provider name Name = "ejson" // KeyPairEnvSeparator is the separator between key pairs in the KeysEnvVar KeyPairEnvSeparator = ":" // KeyPairSeparator is the separator betwen a public and private key in the KeysEnvVar KeyPairSeparator = ";" // FilesEnvVar is the environment variable holding the ejson file list FilesEnvVar = "EJSON_FILES" // KeysEnvVar is the environment variable holding the ejson public / private key pairs KeysEnvVar = "EJSON_KEYS" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decoder ¶
type Decoder struct { Files []string `env:"EJSON_FILES" envSeparator:":"` KeyPairs KeyPairMap `env:"EJSON_KEYS"` }
Decoder is an github.com/lumoslabs/vestibule/pkg/environ.Provider which accepts a list of ejson files and public/private key pairs. Using these and github.com/Shopify/ejson it decodes the files and adds them to a github.com/lumoslabs/vestibule/pkg/environ.Environ
func (*Decoder) AddToEnviron ¶
AddToEnviron uses github.com/Shopify/ejson to decrypt the given ejson files using the provided key pairs. Cleartext file data is decoded into map[string]string objects and merged with the provided environ.Environ
type KeyPairMap ¶
KeyPairMap is a map[string]string that holds a map of ejson public / private key pairs
Click to show internal directories.
Click to hide internal directories.