appenv

package
v0.0.0-...-8dc1d63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Prefix string
	// contains filtered or unexported fields
}

Config .

func NewConfig

func NewConfig(l tool.ILogger, store tool.IStorage) Config

NewConfig .

func (Config) Set

func (c Config) Set(passphrase *validate.Passphrase)

Set a new secure environment variable.

func (Config) Unset

func (c Config) Unset()

Unset a secure environment variable.

func (Config) View

func (c Config) View(passphrase *validate.Passphrase)

View a secure environment variable.

type EnvApp

type EnvApp struct {
	Profiles map[string]EnvProfile `json:"profiles"`
}

EnvApp represents an application.

type EnvFile

type EnvFile struct {
	Apps map[string]EnvApp `json:"apps"`
}

EnvFile is an environment config file.

func (EnvFile) Decrypted

func (f EnvFile) Decrypted(passphrase *validate.Passphrase) EnvFile

Decrypted returns a decrypted object.

func (EnvFile) Encrypted

func (f EnvFile) Encrypted(passphrase *validate.Passphrase) EnvFile

Encrypted returns an encrypted object.

func (*EnvFile) Profile

func (f *EnvFile) Profile(app, profile string) EnvProfile

Profile .

func (*EnvFile) Profiles

func (f *EnvFile) Profiles(app string) map[string]EnvProfile

Profiles .

func (*EnvFile) SetVar

func (f *EnvFile) SetVar(app, profile, name string, value EnvVar)

SetVar .

func (*EnvFile) Var

func (f *EnvFile) Var(app, profile, name string) (EnvVar, bool)

Var .

func (*EnvFile) Vars

func (f *EnvFile) Vars(app, profile string) map[string]EnvVar

Vars .

type EnvProfile

type EnvProfile struct {
	Vars map[string]EnvVar `json:"vars"`
}

EnvProfile is a profile for an application.

func (EnvProfile) Strings

func (f EnvProfile) Strings(passphrase *validate.Passphrase) []string

Strings returns a string array of environment variables.

type EnvVar

type EnvVar struct {
	Value     string `json:"value"`
	Encrypted bool   `json:"encrypted"`
}

EnvVar represents an environment variable.

func (EnvVar) String

func (ev EnvVar) String(name string, passphrase *validate.Passphrase) string

String returns the name and value in this format: name=value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL