Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
Configuration represents a set of configuration key/value pairs.
func GetConfiguration ¶
func GetConfiguration(name string) (Configuration, error)
GetConfiguration returns a named configuration from the database. If this fails an error is returned. The returned configuration even if fetching was not successful can be used to lookup specific values for given keys.
func LoadConfiguration ¶
func LoadConfiguration(name string) (Configuration, error)
LoadConfiguration loads an uncached configuration from the database.
func LoadConfigurationPrefix ¶
func LoadConfigurationPrefix(name, prefix string) (Configuration, error)
LoadConfiguration loads an uncached configuration from the database where the keys have a given prefix.
func (Configuration) Int64 ¶
func (cfg Configuration) Int64(key string, def int64) int64
Int64 returns the int64 value for a given key. If not found the given default value is returned. This methods works on uninitialized configurations, too.
func (Configuration) String ¶
func (cfg Configuration) String(key, def string) string
String returns the string value for a given key. If not found the given default value is returned. This methods works on uninitialized configurations, too.