configuration

package
v0.0.0-...-6e75abd Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLoader

type FileLoader struct {
	Path         string
	Unmarshaller UnmarshalFunc
}

func NewFileLoader

func NewFileLoader(path string, unmarshaller UnmarshalFunc) *FileLoader

func NewJSONFileLoader

func NewJSONFileLoader(path string) *FileLoader

func NewYAMLFileLoader

func NewYAMLFileLoader(path string) *FileLoader

func (*FileLoader) Load

func (l *FileLoader) Load() (map[string]interface{}, error)

type Flattener

type Flattener struct{}

func (*Flattener) Flatten

func (f *Flattener) Flatten(config map[string]interface{}) map[string]interface{}

type MemoryLoader

type MemoryLoader struct {
	Data map[string]interface{}
}

func NewMemoryLoader

func NewMemoryLoader() *MemoryLoader

func NewMemoryLoaderFrom

func NewMemoryLoaderFrom(data map[string]interface{}) *MemoryLoader

func (*MemoryLoader) Delete

func (k *MemoryLoader) Delete(key string)

func (*MemoryLoader) Load

func (k *MemoryLoader) Load() (map[string]interface{}, error)

func (*MemoryLoader) Set

func (k *MemoryLoader) Set(key string, value interface{})

func (*MemoryLoader) SetAll

func (k *MemoryLoader) SetAll(data map[string]interface{})

type UnmarshalFunc

type UnmarshalFunc func(data []byte, target interface{}) error

Jump to

Keyboard shortcuts

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