configloader

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2016 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

The config package provides JSON-based configuration files, with automatic environment variable overriding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigLoader

type ConfigLoader struct {
	// Log is called with debug level logs about how values are resolved.
	Debug, Info func(...interface{})
}

ConfigLoader loads configuration.

func New

func New() ConfigLoader

func (ConfigLoader) GetValue

func (cl ConfigLoader) GetValue(from interface{}, name string) (interface{}, error)

func (ConfigLoader) Load

func (cl ConfigLoader) Load(target interface{}, filePath string) error

func (*ConfigLoader) SetDebugFunc

func (cl *ConfigLoader) SetDebugFunc(f func(...interface{}))

func (*ConfigLoader) SetLogFunc

func (cl *ConfigLoader) SetLogFunc(f func(...interface{}))

func (ConfigLoader) SetValue

func (cl ConfigLoader) SetValue(target interface{}, name, value string) error

type DefaultFiller

type DefaultFiller interface {
	FillDefaults() error
}

Jump to

Keyboard shortcuts

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