Documentation
¶
Index ¶
- Variables
- type BuiltinProviders
- type MappingConfig
- type Porcelain
- func (p *Porcelain) AskForConfirmation(msg string) bool
- func (p *Porcelain) DidCreateNewFile(fname string)
- func (p *Porcelain) DidDeleteKP(kp core.KeyPath, pname string)
- func (p *Porcelain) DidDeleteP(path, pname string)
- func (p *Porcelain) DidPutKVP(kvp core.KeyPath, pname string, sync bool)
- func (p *Porcelain) NoDeleteKP(k, pname string)
- func (p *Porcelain) NoPutKVP(k, pname string)
- func (p *Porcelain) PrintContext(projectName, loadedFrom string)
- func (p *Porcelain) PrintDrift(drifts []core.DriftedEntry)
- func (p *Porcelain) PrintEntries(entries []core.EnvEntry)
- func (p *Porcelain) PrintMatchSummary(findings []core.Match, entries []core.EnvEntry, elapsed time.Duration)
- func (p *Porcelain) PrintMatches(matches []core.Match)
- func (p *Porcelain) StartWizard() (*core.WizardAnswers, error)
- func (p *Porcelain) VSpace(size int)
- type Providers
- type ProvidersMap
- type Redactor
- type Teller
- func (tl *Teller) Collect() error
- func (tl *Teller) CollectFromProvider(pname string) ([]core.EnvEntry, error)
- func (tl *Teller) CollectFromProviderMap(ps *ProvidersMap) ([]core.EnvEntry, error)
- func (tl *Teller) Delete(keys, providerNames []string, directPath string, allKeys bool) error
- func (tl *Teller) Drift(providerNames []string) []core.DriftedEntry
- func (tl *Teller) Exec()
- func (tl *Teller) ExportDotenv() string
- func (tl *Teller) ExportEnv() string
- func (tl *Teller) ExportJSON() (out string, err error)
- func (tl *Teller) ExportYAML() (out string, err error)
- func (tl *Teller) GetProviderByName(pname string) (*MappingConfig, core.Provider, error)
- func (tl *Teller) MirrorDrift(source, target string) ([]core.DriftedEntry, error)
- func (tl *Teller) PrintEnvKeys()
- func (tl *Teller) Put(kvmap map[string]string, providerNames []string, sync bool, directPath string) error
- func (tl *Teller) RedactLines(r io.Reader, w io.Writer) error
- func (tl *Teller) Scan(path string, silent bool) ([]core.Match, error)
- func (tl *Teller) SetupNewProject(fname string) error
- func (tl *Teller) Sync(from string, to []string, sync bool) error
- func (tl *Teller) Template(from, to string) error
- type TellerFile
- type Templating
Constants ¶
This section is empty.
Variables ¶
var TellerFileTemplate = `` /* 7431-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type BuiltinProviders ¶
type BuiltinProviders struct{}
func (*BuiltinProviders) GetProvider ¶
func (p *BuiltinProviders) GetProvider(name string) (core.Provider, error)
func (*BuiltinProviders) ProviderHumanToMachine ¶
func (p *BuiltinProviders) ProviderHumanToMachine() map[string]string
type MappingConfig ¶
type Porcelain ¶
func (*Porcelain) AskForConfirmation ¶
func (*Porcelain) DidCreateNewFile ¶
func (*Porcelain) DidDeleteP ¶
func (*Porcelain) NoDeleteKP ¶
func (*Porcelain) PrintContext ¶
func (*Porcelain) PrintDrift ¶
func (p *Porcelain) PrintDrift(drifts []core.DriftedEntry)
func (*Porcelain) PrintEntries ¶
func (*Porcelain) PrintMatchSummary ¶
func (*Porcelain) PrintMatches ¶
func (*Porcelain) StartWizard ¶
func (p *Porcelain) StartWizard() (*core.WizardAnswers, error)
type ProvidersMap ¶
type ProvidersMap map[string]MappingConfig
type Redactor ¶
type Redactor struct { io.WriteCloser // contains filtered or unexported fields }
type Teller ¶
type Teller struct { Redact bool Cmd []string Config *TellerFile Porcelain *Porcelain Populate *core.Populate Providers Providers Entries []core.EnvEntry Templating *Templating Logger logging.Logger }
Teller Cmd - command to execute if any given. Porcelain - wrapping teller in a nice porcelain; in other words the textual UI for teller. Providers - the available providers to use. Entries - when loaded, these contains the mapped entries. Load them with Collect() Templating - Teller's templating options.
func NewTeller ¶
Create a new Teller instance, using a tellerfile, and a command to execute (if any)
func (*Teller) Collect ¶
The main "load all variables from all providers" logic. Walks over all definitions in the tellerfile and then: fetches, converts, creates a new EnvEntry. We're also mapping the sensitivity aspects of it. Note that for a similarly named entry - last one wins.
func (*Teller) CollectFromProvider ¶
func (*Teller) CollectFromProviderMap ¶
func (tl *Teller) CollectFromProviderMap(ps *ProvidersMap) ([]core.EnvEntry, error)
func (*Teller) Exec ¶
func (tl *Teller) Exec()
Execute a command with teller. This requires all entries to be loaded beforehand with Collect()
func (*Teller) ExportDotenv ¶
Export variables into a .env format (basically a KEY=VAL format, that's also compatible with Docker)
func (*Teller) ExportJSON ¶
func (*Teller) ExportYAML ¶
func (*Teller) GetProviderByName ¶
func (*Teller) MirrorDrift ¶
func (tl *Teller) MirrorDrift(source, target string) ([]core.DriftedEntry, error)
func (*Teller) PrintEnvKeys ¶
func (tl *Teller) PrintEnvKeys()
func (*Teller) RedactLines ¶
Execute a command with teller. This requires all entries to be loaded beforehand with Collect()
func (*Teller) Scan ¶
Scan for entries. Each of the mapped entries is considered highly sensitive unless stated other wise (with sensitive: high|medium|low|none) as such, we can offer a security scan to locate those in the current codebase (if the entries are sensitive and are placed inside a vault or similar store, what's the purpose of hardcoding these? let's help ourselves and locate throughout all the files in the path given)
func (*Teller) SetupNewProject ¶
Start an interactive wizard, that will create a file when completed.
type TellerFile ¶
type TellerFile struct { Opts map[string]string `yaml:"opts,omitempty"` Confirm string `yaml:"confirm,omitempty"` Project string `yaml:"project,omitempty"` CarryEnv bool `yaml:"carry_env,omitempty"` Providers ProvidersMap `yaml:"providers,omitempty"` LoadedFrom string }
func NewTellerFile ¶
func NewTellerFile(s string) (*TellerFile, error)
type Templating ¶
type Templating struct{}
func (*Templating) ForGlob ¶
func (t *Templating) ForGlob() *Templating
func (*Templating) ForTemplate ¶
func (*Templating) New ¶
func (t *Templating) New() *Templating