secretary

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

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 9 Imported by: 0

README

secretary - load secret environment files

Responsibilities of this package

  1. Load from local secret sources
  2. Evaluate POSIX like secret files
  3. CLI flags for repeated pass/plain file loading

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PassSetConfig

func PassSetConfig(conf string)

func PassSetStoreDir

func PassSetStoreDir(dir string)

Types

type Environment

type Environment map[string]string

func ParseEnvironment

func ParseEnvironment(envv []string) (Environment, error)

func ParseEnvironmentFile

func ParseEnvironmentFile(name, content string) (Environment, error)

func PassLoadSecret

func PassLoadSecret(name string) (Environment, error)

func PlainLoadSecret

func PlainLoadSecret(name string) (Environment, error)

func (Environment) Envv

func (e Environment) Envv() []string

type LoadFlag

type LoadFlag struct {
	Type LoadType
	Name string
}

type LoadFlags

type LoadFlags []LoadFlag

type LoadPassFlag

type LoadPassFlag LoadFlags

func (*LoadPassFlag) Set

func (f *LoadPassFlag) Set(value string) error

func (*LoadPassFlag) String

func (f *LoadPassFlag) String() string

type LoadPlainFileFlag

type LoadPlainFileFlag LoadFlags

func (*LoadPlainFileFlag) Set

func (f *LoadPlainFileFlag) Set(value string) error

func (*LoadPlainFileFlag) String

func (f *LoadPlainFileFlag) String() string

type LoadType

type LoadType int
const (
	LoadUnknown LoadType = iota
	LoadPlainFile
	LoadPass
	Set
	Unset
)

type SetFlag

type SetFlag LoadFlags

func (*SetFlag) Set

func (f *SetFlag) Set(value string) error

func (*SetFlag) String

func (f *SetFlag) String() string

type UnsetFlag

type UnsetFlag LoadFlags

func (*UnsetFlag) Set

func (f *UnsetFlag) Set(value string) error

func (*UnsetFlag) String

func (f *UnsetFlag) String() string

Jump to

Keyboard shortcuts

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