valuesource

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValid

func IsValid(set Set, key string) bool

IsValid determines if the provided key (designating a name of a parameter or credential) is included in the provided set

Types

type Set

type Set map[string]string

Set is an actual set of resolved values. This is the output of resolving a parameter or credential set file.

func (Set) Merge

func (s Set) Merge(s2 Set) error

Merge merges a second Set into the base.

Duplicate names are not allow and will result in an error, this is the case even if the values are identical.

type Source

type Source struct {
	Key   string
	Value string
}

Source represents a strategy for loading a value from local host.

func (Source) MarshalJSON

func (s Source) MarshalJSON() ([]byte, error)

func (Source) MarshalYAML

func (s Source) MarshalYAML() (interface{}, error)

func (*Source) UnmarshalJSON

func (s *Source) UnmarshalJSON(data []byte) error

func (*Source) UnmarshalYAML

func (s *Source) UnmarshalYAML(unmarshal func(interface{}) error) error

type Strategy

type Strategy struct {
	// Name is the name of the parameter or credential.
	Name string `json:"name" yaml:"name"`
	// Source is the location of the value.
	// During resolution, the source will be loaded, and the result temporarily placed
	// into Value.
	Source Source `json:"source,omitempty" yaml:"source,omitempty"`
	// Value holds the parameter or credential value.
	// When a parameter or credential is loaded, it is loaded into this field. In all
	// other cases, it is empty. This field is omitted during serialization.
	Value string `json:"-" yaml:"-"`
}

Strategy represents a strategy for determining the value of a parameter or credential

Jump to

Keyboard shortcuts

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