core

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntriesByKey

type EntriesByKey []EnvEntry

func (EntriesByKey) Len

func (a EntriesByKey) Len() int

func (EntriesByKey) Less

func (a EntriesByKey) Less(i, j int) bool

func (EntriesByKey) Swap

func (a EntriesByKey) Swap(i, j int)

type EnvEntry

type EnvEntry struct {
	Key          string
	Value        string
	Provider     string
	ResolvedPath string
}

type EnvEntryLookup

type EnvEntryLookup struct {
	Entries []EnvEntry
}

func (*EnvEntryLookup) EnvBy

func (e *EnvEntryLookup) EnvBy(key, provider, path, dflt string) string

func (*EnvEntryLookup) EnvByKey

func (e *EnvEntryLookup) EnvByKey(key, dflt string) string

func (*EnvEntryLookup) EnvByKeyAndProvider

func (e *EnvEntryLookup) EnvByKeyAndProvider(key, provider, dflt string) string

type KeyPath

type KeyPath struct {
	Env      string `yaml:"env,omitempty"`
	Path     string `yaml:"path"`
	Field    string `yaml:"field,omitempty"`
	Decrypt  bool   `yaml:"decrypt,omitempty"`
	Optional bool   `yaml:"optional,omitempty"`
}

func (*KeyPath) SwitchPath

func (k *KeyPath) SwitchPath(path string) KeyPath

func (*KeyPath) WithEnv

func (k *KeyPath) WithEnv(env string) KeyPath

type Opts

type Opts map[string]string

type Populate

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

func NewPopulate

func NewPopulate(opts Opts) *Populate

func (*Populate) FindAndReplace

func (p *Populate) FindAndReplace(path string) string

func (*Populate) KeyPath

func (p *Populate) KeyPath(kp KeyPath) KeyPath

type Provider

type Provider interface {
	Name() string
	// in this case 'env' is empty, but EnvEntries are the value
	GetMapping(p KeyPath) ([]EnvEntry, error)

	// in this case env is filled
	Get(p KeyPath) (*EnvEntry, error)
}

type WizardAnswers

type WizardAnswers struct {
	Project      string
	Providers    []string
	ProviderKeys map[string]bool
	Confirm      bool
}

Jump to

Keyboard shortcuts

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