configuration

package
v0.0.0-...-0f9887e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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) (Map, error)
	Put(string, string) 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 Map, err error)

func (*ConsulConfiguration) Put

func (cc *ConsulConfiguration) Put(key string, value string) (err error)

type Item

type Item interface {
	IsValue() bool
	IsMap() bool
	Value() string
	Map() Map
}

type Map

type Map map[string]Item

func (Map) IsMap

func (m Map) IsMap() bool

func (Map) IsValue

func (m Map) IsValue() bool

func (Map) Map

func (m Map) Map() Map

func (Map) Value

func (m Map) Value() string

type String

type String string

func (String) IsMap

func (s String) IsMap() bool

func (String) IsValue

func (s String) IsValue() bool

func (String) Map

func (s String) Map() Map

func (String) Value

func (s String) Value() string

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 Map, err error)

func (*YamlConfiguration) Put

func (yc *YamlConfiguration) Put(key string, value string) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL