config

package
v0.0.0-...-580ec26 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfigBuilder = NewDefaultConfigBuilder()

Functions

func Load

func Load(ctx context.Context, to interface{}) error

func LoadOrFatal

func LoadOrFatal(ctx context.Context, to interface{})

func ToString

func ToString(iface interface{}) string

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewConfigBuilder

func NewConfigBuilder(backends ...backend.Backend) *Builder

func NewDefaultConfigBuilder

func NewDefaultConfigBuilder() *Builder

* Create Builder preconfigured with: * - .env file loader if file exist * - environment variable loader * - flags loader

func (*Builder) AppendBackends

func (cb *Builder) AppendBackends(backends ...backend.Backend) *Builder

func (*Builder) Load

func (cb *Builder) Load(ctx context.Context, to interface{}) error

func (*Builder) LoadOrFatal

func (cb *Builder) LoadOrFatal(ctx context.Context, to interface{})

func (*Builder) PrependBackends

func (cb *Builder) PrependBackends(backends ...backend.Backend) *Builder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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