Documentation
¶
Index ¶
- func EncodeOSEnv(key, val string) string
- func EncodeOSEnvFunc(key, val string, fn callback) string
- func EncodeOSEnvWithSecret(key, val string) string
- func GetEnv(opts GetEnvOptions) ([]string, error)
- func GetSecretNameForEnv(env string, group string) string
- func IsValueSecret(val string) (bool, string)
- func ProcessSecrets(ctx context.Context, logger logger.Logger, projectID string, env string, ...) error
- func SetEnvFromEnvFile(envfile string) error
- func WriteEnvFile(fn string, envs []EnvLine) error
- type EnvLine
- type GetEnvOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeOSEnv ¶
EncodeOSEnv encodes an environment variable for use in an OS environment.
func EncodeOSEnvFunc ¶
EncodeOSEnvFunc encodes an environment variable for use in an OS environment using a custom sprintf function.
func EncodeOSEnvWithSecret ¶
func GetEnv ¶
func GetEnv(opts GetEnvOptions) ([]string, error)
GetEnv will return the environment variables for the given environment and group.
func GetSecretNameForEnv ¶
func IsValueSecret ¶
func ProcessSecrets ¶
func SetEnvFromEnvFile ¶
SetEnvFromEnvFile will set the environment variables from an env file.
func WriteEnvFile ¶
Types ¶
type EnvLine ¶
type EnvLine struct {
Key string `json:"key"`
Val string `json:"val"`
IsSecret bool `json:"secret,omitempty"`
}
func ParseEnvBuffer ¶
ParseEnvBuffer parses an environment file from a buffer and returns a list of EnvLine structs.
func ParseEnvFile ¶
ParseEnvFile parses an environment file and returns a list of EnvLine structs.
func ParseEnvValue ¶
func ProcessEnvLine ¶
ProcessEnvLine processes an environment variable line and returns an EnvLine struct with the key, value, and secret flag set.
Click to show internal directories.
Click to hide internal directories.