Documentation
¶
Index ¶
- type Project
- type Vault
- func (v *Vault) Close() error
- func (v *Vault) CreateEnvironment(projectID int64, name string) (int64, error)
- func (v *Vault) CreateProject(name, path string) (int64, error)
- func (v *Vault) DeleteLocalOverride(project, env, key string) error
- func (v *Vault) DeleteProject(projectID int64) error
- func (v *Vault) DeleteVariable(environmentID int64, key string) error
- func (v *Vault) GetEnvironment(projectID int64, name string) (int64, error)
- func (v *Vault) GetLocalOverride(project, env, key string) (string, bool, error)
- func (v *Vault) GetLocalOverrides(project, env string) (map[string]string, error)
- func (v *Vault) GetProjectByName(name string) (int64, string, error)
- func (v *Vault) GetProjectByPath(path string) (int64, string, error)
- func (v *Vault) GetVariable(environmentID int64, key string) (string, error)
- func (v *Vault) GetVariables(environmentID int64) (map[string]string, error)
- func (v *Vault) ListEnvironments(projectID int64) ([]string, error)
- func (v *Vault) ListProjects() ([]Project, error)
- func (v *Vault) SetLocalOverride(project, env, key, value string) error
- func (v *Vault) SetVariable(environmentID int64, key, value string) error
- func (v *Vault) VariableExists(environmentID int64, key string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}
Vault represents the encrypted database
func (*Vault) CreateEnvironment ¶
CreateEnvironment creates an environment within a project
func (*Vault) CreateProject ¶
CreateProject registers a new project in the vault
func (*Vault) DeleteLocalOverride ¶
DeleteLocalOverride removes a local override for a variable.
func (*Vault) DeleteProject ¶
DeleteProject removes a project and all its environments and variables
func (*Vault) DeleteVariable ¶
DeleteVariable removes a variable from an environment
func (*Vault) GetEnvironment ¶
GetEnvironment looks up an environment by project and name
func (*Vault) GetLocalOverride ¶
GetLocalOverride returns the local override value for a variable, if one exists. Returns empty string and false if no override is set.
func (*Vault) GetLocalOverrides ¶
GetLocalOverrides returns all local overrides for a project/environment as a map.
func (*Vault) GetProjectByName ¶
GetProjectByName looks up a project by its name
func (*Vault) GetProjectByPath ¶
GetProjectByPath looks up a project by its path on disk
func (*Vault) GetVariable ¶
GetVariable returns the value of a single variable
func (*Vault) GetVariables ¶
GetVariables returns all variables in an environment as a map
func (*Vault) ListEnvironments ¶
ListEnvironments returns the names of all environments in a project
func (*Vault) ListProjects ¶
ListProjects returns all registered projects
func (*Vault) SetLocalOverride ¶
SetLocalOverride saves or updates a local override for a variable. Uses project and environment names directly since in server mode those projects do not exist in the local vault.
func (*Vault) SetVariable ¶
SetVariable saves or updates a variable in an environment