environments

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvManifest

type EnvManifest struct {
	// contains filtered or unexported fields
}

func GetManifest

func GetManifest(path string) (envManifest *EnvManifest, err error)

func NewManifest

func NewManifest(path string) (envManifest *EnvManifest, err error)

func (*EnvManifest) DeleteEnv

func (envManifest *EnvManifest) DeleteEnv(id string) (env *Environment, err error)

func (*EnvManifest) GetEnv

func (envManifest *EnvManifest) GetEnv(id string) (env *Environment)

func (*EnvManifest) ListEnvs

func (envManifest *EnvManifest) ListEnvs() (environments []*Environment)

func (EnvManifest) MarshalYAML

func (envManifest EnvManifest) MarshalYAML() (interface{}, error)

func (*EnvManifest) PutEnv

func (envManifest *EnvManifest) PutEnv(env *Environment) (err error)

func (*EnvManifest) RootPublicKey

func (envManifest *EnvManifest) RootPublicKey() (*crypto.PublicKey, error)

func (*EnvManifest) SearchEnvs

func (envManifest *EnvManifest) SearchEnvs(queries []string) (environments []*Environment)

func (*EnvManifest) SetRoot

func (envManifest *EnvManifest) SetRoot(env *Environment) error

func (*EnvManifest) UnmarshalYAML

func (envManifest *EnvManifest) UnmarshalYAML(value *yaml.Node) (err error)

type EnvType

type EnvType string
const (
	EnvironmentKey crypto.KeyType = 'E'
	USER           EnvType        = "user"
	SERVICE        EnvType        = "service"
	ROOT           EnvType        = "root"
)

type Environment

type Environment struct {
	PublicKey     string   `yaml:"publicKey"`
	Name          string   `yaml:"name"`
	Email         string   `yaml:"email"`
	EnvType       EnvType  `yaml:"type"`
	Tags          []string `yaml:"tags"`
	SecretBinding string   `yaml:"binding,omitempty"`
	// contains filtered or unexported fields
}

func FromEnvDef

func FromEnvDef(envDef string) (env *Environment, err error)

func GetSelf

func GetSelf() *Environment

func NewEnvironment

func NewEnvironment(name string, envType EnvType, pq bool) (*Environment, *crypto.SecretKey, error)

func (*Environment) AddTags

func (env *Environment) AddTags(tags ...string)

func (*Environment) MarkAsSelf

func (env *Environment) MarkAsSelf() error

func (*Environment) Search

func (env *Environment) Search(query string) bool

func (*Environment) SetEmail

func (env *Environment) SetEmail(email string)

func (*Environment) ToEnvDef

func (env *Environment) ToEnvDef() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳