package
Version:
v0.0.0-...-4351fdd
Opens a new window with list of versions in this module.
Published: Dec 14, 2020
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Decode(conf map[string]interface{}, target interface{}) error
Decode converts a configuration map into the desired target type
Decode errors on unused keys
func PartialDecode(conf map[string]interface{}, target interface{}) error
PartialDecode converts a configuration map into the desired target type.
PartialDecode does not error on unused keys
type Action struct {
Entity `yaml:",squash"`
}
String implements Stringer for debugging
type Config struct {
Sources []Generic `yaml:"sources"`
Targets []Generic `yaml:"targets"`
Wires []Wire `yaml:"wires"`
Mappings []Mapping `yaml:"mappings"`
Actions []Generic `yaml:"actions"`
}
Dump dumps parsed config to console
type Credentials struct {
User string `yaml:"user"`
Password string `yaml:"password"`
}
type Entity struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
}
type Generic map[string]interface{}
type Mapping struct {
Name string `yaml:"name"`
Entries []MapEntry `yaml:"entries"`
}
type Wire struct {
Source string `yaml:"source"`
Target string `yaml:"target"`
Actions []string `yaml:"actions"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.