core

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DriftedEntriesBySource added in v1.1.0

type DriftedEntriesBySource []DriftedEntry

func (DriftedEntriesBySource) Len added in v1.1.0

func (a DriftedEntriesBySource) Len() int

func (DriftedEntriesBySource) Less added in v1.1.0

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

func (DriftedEntriesBySource) Swap added in v1.1.0

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

type DriftedEntry added in v1.1.0

type DriftedEntry struct {
	Diff   string
	Source EnvEntry
	Target EnvEntry
}

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 EntriesByProvider added in v1.5.1

type EntriesByProvider []EnvEntry

func (EntriesByProvider) Len added in v1.5.1

func (a EntriesByProvider) Len() int

func (EntriesByProvider) Less added in v1.5.1

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

func (EntriesByProvider) Swap added in v1.5.1

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

type EntriesByValueSize added in v1.0.0

type EntriesByValueSize []EnvEntry

func (EntriesByValueSize) Len added in v1.0.0

func (a EntriesByValueSize) Len() int

func (EntriesByValueSize) Less added in v1.0.0

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

func (EntriesByValueSize) Swap added in v1.0.0

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

type EnvEntry

type EnvEntry struct {
	Key          string
	Field        string
	Value        string
	ProviderName string
	ResolvedPath string
	Severity     Severity
	RedactWith   string
	Source       string
	Sink         string
	IsFound      bool
}

func (*EnvEntry) AddressingKeyPath added in v1.3.0

func (ee *EnvEntry) AddressingKeyPath() *KeyPath

type EnvEntryLookup

type EnvEntryLookup struct {
	Entries []EnvEntry
}

func (*EnvEntryLookup) EnvBy

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

func (*EnvEntryLookup) EnvByKey

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

func (*EnvEntryLookup) EnvByKeyAndProvider

func (ee *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"`
	Remap      map[string]string `yaml:"remap,omitempty"`
	Decrypt    bool              `yaml:"decrypt,omitempty"`
	Optional   bool              `yaml:"optional,omitempty"`
	Severity   Severity          `yaml:"severity,omitempty" default:"high"`
	RedactWith string            `yaml:"redact_with,omitempty" default:"**REDACTED**"`
	Source     string            `yaml:"source,omitempty"`
	Sink       string            `yaml:"sink,omitempty"`
}

func (*KeyPath) EffectiveKey added in v1.3.0

func (k *KeyPath) EffectiveKey() string

func (*KeyPath) Found added in v1.3.0

func (k *KeyPath) Found(v string) EnvEntry

func (*KeyPath) FoundWithKey added in v1.3.0

func (k *KeyPath) FoundWithKey(key, v string) EnvEntry

NOTE: consider doing what 'updateParams' does in these builders

func (*KeyPath) Missing added in v1.3.0

func (k *KeyPath) Missing() EnvEntry

func (*KeyPath) SwitchPath

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

func (*KeyPath) WithEnv

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

type Match added in v1.0.0

type Match struct {
	Path       string
	Line       string
	LineNumber int
	MatchIndex int
	Entry      EnvEntry
}

type MetaInfo added in v1.5.6

type MetaInfo struct {
	Description    string
	Name           string
	Authentication string
	ConfigTemplate string
	Ops            OpMatrix
}

type OpMatrix added in v1.5.6

type OpMatrix struct {
	Delete        bool
	DeleteMapping bool
	Put           bool
	PutMapping    bool
	Get           bool
	GetMapping    bool
}

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 {
	// 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)

	Put(p KeyPath, val string) error
	PutMapping(p KeyPath, m map[string]string) error

	Delete(p KeyPath) error
	DeleteMapping(p KeyPath) error
}

type RegisteredProvider added in v1.5.6

type RegisteredProvider struct {
	Meta    MetaInfo
	Builder func(logger logging.Logger) (Provider, error)
}

type Severity added in v1.0.0

type Severity string
const (
	High   Severity = "high"
	Medium Severity = "medium"
	Low    Severity = "low"
	None   Severity = "none"
)

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