config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(config *CHYLE, logger *log.Logger)

Debug dumps given CHYLE config as JSON structure

Types

type CHYLE

type CHYLE struct {
	FEATURES struct {
		MATCHERS   matchers.Features
		EXTRACTORS extractors.Features
		DECORATORS decorators.Features
		SENDERS    senders.Features
	} `json:"-"`
	GIT struct {
		REPOSITORY struct {
			PATH string
		}
		REFERENCE struct {
			FROM string
			TO   string
		}
	}
	MATCHERS   matchers.Config
	EXTRACTORS extractors.Config
	DECORATORS decorators.Config
	SENDERS    senders.Config
}

CHYLE hold config extracted from environment variables

func Create

func Create(envConfig *envh.EnvTree) (*CHYLE, error)

Create returns app config from an EnvTree object

func (*CHYLE) Walk

func (c *CHYLE) Walk(fullconfig *envh.EnvTree, keyChain []string) (bool, error)

Walk traverses struct to populate or validate fields

Jump to

Keyboard shortcuts

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