Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLoader = NewSubLoader(NewYAMLLoader())
Generic loader that can load values of any supported format
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader interface {
// Returns true if the byte array can be converted into a key/value map
CanGetEnvironmentValues([]byte) bool
// Converts the byte array into a key/value map
GetEnvironmentValues([]byte) (map[string]string, error)
// Human-readable name of the loader
Name() string
}
Defines a type that can load environment values from raw byte sources
type SOPSYAMLSubloader ¶
type SOPSYAMLSubloader struct{}
func (*SOPSYAMLSubloader) CanGetEnvironmentValues ¶
func (*SOPSYAMLSubloader) CanGetEnvironmentValues(yamlBytes []byte) bool
func (*SOPSYAMLSubloader) GetEnvironmentValues ¶
func (*SOPSYAMLSubloader) GetEnvironmentValues(yamlBytes []byte) (map[string]string, error)
func (*SOPSYAMLSubloader) Name ¶
func (*SOPSYAMLSubloader) Name() string
type SubLoader ¶
type SubLoader struct {
SubLoaders []Loader
}
Loader that tries several other loaders and uses the first one that can successfully load provided values
func NewSubLoader ¶
func (*SubLoader) CanGetEnvironmentValues ¶
type YAMLLoader ¶
type YAMLLoader struct {
*SubLoader
}
func NewYAMLLoader ¶
func NewYAMLLoader() *YAMLLoader
func (*YAMLLoader) Name ¶
func (*YAMLLoader) Name() string
Click to show internal directories.
Click to hide internal directories.