Documentation
¶
Overview ¶
Package env manages per-project environment variables for cloop. Variables are stored in .cloop/env.yaml. Secret values are stored base64-encoded with an "enc:" prefix so they are not in plain text.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeValue ¶
DecodeValue returns the plain-text value for a Var, decoding "enc:" secrets.
func EnvLines ¶
EnvLines returns the vars as KEY=value pairs suitable for os/exec Env. Secret values are decoded before being returned.
func InjectIntoPrompt ¶
InjectIntoPrompt replaces {{KEY}} placeholders in prompt with the corresponding values from vars. Unknown placeholders are left intact.
Types ¶
type Var ¶
type Var struct {
Key string `yaml:"key"`
Value string `yaml:"value"`
Description string `yaml:"description,omitempty"`
Secret bool `yaml:"secret,omitempty"`
}
Var is a single environment variable entry.
func Delete ¶
Delete removes the var with the given key from vars and returns the new slice. Returns the slice unchanged and false if the key was not found.