Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Decrypt(secret Secret) ([]byte, error) Encrypt(secret []byte) (*Secret, error) Secret(domain, kind string) ([]byte, error) SecretFromFile(pathToFile string) (*Secret, error) DownloadAndDecryptAndCache(ctx context.Context, bucket, dir string, required Required) error }
Client interface for secrets
type Required ¶
Required secrets map, where the key is the domain of the secret and the values are the types of secrets
This should map to the naming scheme of the encrypted secret file, e.g.:
- Secret file naming should be "secret_domain-secret_type-cloudkms_env.json"
- If a required secret is from some api, it is a key, the domain is "some_api" and the type "key"
- If the file was encrypted using cloudkms in a "dev" env, the file name is "some_api-key-cloudkms_dev.json"
func ReduceRequired ¶
ReduceRequired secrets into one set
Click to show internal directories.
Click to hide internal directories.