Documentation
¶
Overview ¶
Package config provides the interface Handler and errors related to the configuration of adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyConfig is returned when the config has not been initialized. ErrEmptyConfig = errors.New("", errors.NoneSeverity, "Config not initialized") )
Functions ¶
Types ¶
type Handler ¶
type Handler interface {
// SetKey is used to set a string value for a given key.
SetKey(key string, value string)
// GetKey is used to retrieve a string value for a given key.
GetKey(key string) string
// GetObject is used to retrieve an object for a given key and a given interface representing that object in result.
GetObject(key string, result interface{}) error
// SetObject is used to set an object for a given key and a given interface representing that object in result.
SetObject(key string, value interface{}) error
// GetAll is used to retrieve all objects.
GetAll(result interface{}) error
// Is is used to check if a config is defined for a given key
Is(key string) bool
}
Handler is the config interface to fascilitate multiple providers
Click to show internal directories.
Click to hide internal directories.