Documentation ¶
Overview ¶
Package configuration defines the Configuration interface as the main access point to O² Configuration backends. Consul and YAML backends are also provided.
Index ¶
- type Array
- type Configuration
- type ConsulConfiguration
- func (cc *ConsulConfiguration) Exists(key string) (exists bool, err error)
- func (cc *ConsulConfiguration) Get(key string) (value string, err error)
- func (cc *ConsulConfiguration) GetRecursive(key string) (value Item, err error)
- func (cc *ConsulConfiguration) GetRecursiveYaml(key string) (value []byte, err error)
- func (cc *ConsulConfiguration) Put(key string, value string) (err error)
- func (cc *ConsulConfiguration) PutRecursive(string, Item) error
- func (cc *ConsulConfiguration) PutRecursiveYaml(string, []byte) error
- type Item
- type ItemType
- type Map
- type String
- type YamlConfiguration
- func (yc *YamlConfiguration) Exists(key string) (exists bool, err error)
- func (yc *YamlConfiguration) Get(key string) (value string, err error)
- func (yc *YamlConfiguration) GetRecursive(key string) (value Item, err error)
- func (yc *YamlConfiguration) GetRecursiveYaml(key string) (value []byte, err error)
- func (yc *YamlConfiguration) Put(key string, value string) (err error)
- func (yc *YamlConfiguration) PutRecursive(key string, value Item) (err error)
- func (yc *YamlConfiguration) PutRecursiveYaml(key string, value []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration interface { Get(string) (string, error) GetRecursive(string) (Item, error) GetRecursiveYaml(string) ([]byte, error) Put(string, string) error PutRecursive(string, Item) error PutRecursiveYaml(string, []byte) error Exists(string) (bool, error) }
func NewConfiguration ¶
func NewConfiguration(uri string) (configuration Configuration, err error)
type ConsulConfiguration ¶
type ConsulConfiguration struct {
// contains filtered or unexported fields
}
func (*ConsulConfiguration) Exists ¶
func (cc *ConsulConfiguration) Exists(key string) (exists bool, err error)
func (*ConsulConfiguration) Get ¶
func (cc *ConsulConfiguration) Get(key string) (value string, err error)
func (*ConsulConfiguration) GetRecursive ¶
func (cc *ConsulConfiguration) GetRecursive(key string) (value Item, err error)
func (*ConsulConfiguration) GetRecursiveYaml ¶
func (cc *ConsulConfiguration) GetRecursiveYaml(key string) (value []byte, err error)
func (*ConsulConfiguration) Put ¶
func (cc *ConsulConfiguration) Put(key string, value string) (err error)
func (*ConsulConfiguration) PutRecursive ¶
func (cc *ConsulConfiguration) PutRecursive(string, Item) error
func (*ConsulConfiguration) PutRecursiveYaml ¶
func (cc *ConsulConfiguration) PutRecursiveYaml(string, []byte) error
type YamlConfiguration ¶
type YamlConfiguration struct {
// contains filtered or unexported fields
}
func (*YamlConfiguration) Exists ¶
func (yc *YamlConfiguration) Exists(key string) (exists bool, err error)
func (*YamlConfiguration) Get ¶
func (yc *YamlConfiguration) Get(key string) (value string, err error)
func (*YamlConfiguration) GetRecursive ¶
func (yc *YamlConfiguration) GetRecursive(key string) (value Item, err error)
func (*YamlConfiguration) GetRecursiveYaml ¶
func (yc *YamlConfiguration) GetRecursiveYaml(key string) (value []byte, err error)
func (*YamlConfiguration) Put ¶
func (yc *YamlConfiguration) Put(key string, value string) (err error)
func (*YamlConfiguration) PutRecursive ¶
func (yc *YamlConfiguration) PutRecursive(key string, value Item) (err error)
func (*YamlConfiguration) PutRecursiveYaml ¶
func (yc *YamlConfiguration) PutRecursiveYaml(key string, value []byte) (err error)
Click to show internal directories.
Click to hide internal directories.