Documentation ¶
Index ¶
- Variables
- func GetBool(config map[string]interface{}, field string, opts ...Option) (bool, error)
- func GetFloat64(config map[string]interface{}, field string, opts ...Option) (float64, error)
- func GetIPAddress(config map[string]interface{}, field string, opts ...Option) (string, int, error)
- func GetIPAddressList(config map[string]interface{}, field string, opts ...Option) ([]string, []int, error)
- func GetInt(config map[string]interface{}, field string, opts ...Option) (int, error)
- func GetInterface(config map[string]interface{}, field string, opts ...Option) (interface{}, error)
- func GetInterfaceList(config map[string]interface{}, field string, opts ...Option) ([]interface{}, error)
- func GetMap(config map[string]interface{}, field string, opts ...Option) (map[string]interface{}, error)
- func GetString(config map[string]interface{}, field string, opts ...Option) (string, error)
- func GetStringList(config map[string]interface{}, field string, opts ...Option) ([]string, error)
- type Config
- type DataSourceConfig
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("field not found")
Functions ¶
func GetFloat64 ¶
GetFloat64 gets a float64 from the given field.
func GetIPAddress ¶
GetIPAddress gets an ip address from the given field.
func GetIPAddressList ¶ added in v0.3.0
func GetIPAddressList(config map[string]interface{}, field string, opts ...Option) ([]string, []int, error)
GetIPAddress gets an ip address list, as a list of hosts and a list of ports from the given field.
func GetInterface ¶
GetInterface get's the given potentially nested field irrelevant of it's type. This will recursively descend into submaps.
func GetInterfaceList ¶
func GetInterfaceList(config map[string]interface{}, field string, opts ...Option) ([]interface{}, error)
GetInterfaceList gets a list from the given field.
func GetMap ¶
func GetMap(config map[string]interface{}, field string, opts ...Option) (map[string]interface{}, error)
GetMap gets a sub-map from the given field.
Types ¶
type Config ¶
type Config struct { DataSources []DataSourceConfig `yaml:"dataSources"` Execution map[string]interface{} `yaml:"execution"` Physical map[string]interface{} `yaml:"physical"` }
func ReadConfig ¶
type DataSourceConfig ¶
type Option ¶
type Option func(options *options)
func WithDefault ¶
func WithDefault(value interface{}) Option
Click to show internal directories.
Click to hide internal directories.