Documentation ¶
Index ¶
- func KnownConfigKeys(schema environschema.Fields) set.Strings
- type Config
- type ConfigAttributes
- func (c ConfigAttributes) Get(attrName string, defaultValue interface{}) interface{}
- func (c ConfigAttributes) GetBool(attrName string, defaultValue bool) bool
- func (c ConfigAttributes) GetInt(attrName string, defaultValue int) int
- func (c ConfigAttributes) GetString(attrName string, defaultValue string) string
- func (c ConfigAttributes) GetStringMap(attrName string, defaultValue map[string]string) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KnownConfigKeys ¶
KnownConfigKeys returns the valid config keys.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config encapsulates config for an entity.
func NewConfig ¶
func NewConfig(attrs map[string]interface{}, schema environschema.Fields, defaults schema.Defaults) (*Config, error)
NewConfig returns a new config instance with the given attributes and allowing for the extra provider attributes.
func (*Config) Attributes ¶
func (c *Config) Attributes() ConfigAttributes
Attributes returns all the config attributes.
type ConfigAttributes ¶
type ConfigAttributes map[string]interface{}
ConfigAttributes represents config for an entity.
func (ConfigAttributes) Get ¶
func (c ConfigAttributes) Get(attrName string, defaultValue interface{}) interface{}
Get gets the specified attribute.
func (ConfigAttributes) GetBool ¶
func (c ConfigAttributes) GetBool(attrName string, defaultValue bool) bool
GetBool gets the specified bool attribute.
func (ConfigAttributes) GetInt ¶
func (c ConfigAttributes) GetInt(attrName string, defaultValue int) int
GetInt gets the specified int attribute.
func (ConfigAttributes) GetString ¶
func (c ConfigAttributes) GetString(attrName string, defaultValue string) string
GetString gets the specified string attribute.
func (ConfigAttributes) GetStringMap ¶
func (c ConfigAttributes) GetStringMap(attrName string, defaultValue map[string]string) (map[string]string, error)
GetStringMap gets the specified map attribute as map[string]string.
Click to show internal directories.
Click to hide internal directories.