Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Environment ¶
type Environment struct { Name string `json:"name"` Description string `json:"description"` Entries []*EnvironmentEntry `json:"entries"` }
Environment is a list of environment variables.
func NewEnvironment ¶
func NewEnvironment(name, description string) *Environment
NewEnvironment creates a new Environment instance.
func ToEnv ¶
func ToEnv(config any, name, description, prefix string) *Environment
ToEnv returns an environment struct with the values of the given config.
func (*Environment) Delete ¶
func (e *Environment) Delete(key string)
Delete removes an EnvironmentEntry by key.
func (*Environment) Get ¶
func (e *Environment) Get(key string) (*EnvironmentEntry, bool)
Get returns an EnvironmentEntry by key.
func (*Environment) Marshal ¶
func (e *Environment) Marshal(format string) string
Marshal returns the Environment as a string in the given format.
func (*Environment) Set ¶
func (e *Environment) Set(entry *EnvironmentEntry)
Set adds an EnvironmentEntry to the Environment.
type EnvironmentEntry ¶
type EnvironmentEntry struct { Key string `json:"key"` Value string `json:"value"` Secret bool `json:"secret"` }
EnvironmentEntry is a key-value pair that represents an environment variable.
Click to show internal directories.
Click to hide internal directories.