config

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package config holds all specified configuration information aggregated from all possible inputs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username      string
	Password      string
	Environments  map[string]s.Environment
	Port          int
	ErrorMatchers []interfaces.ErrorMatcher
}

Config is a representation of a config yaml. It can contain multiple Environments.

func Custom

func Custom(getenv func(string) string, configPath string) (Config, error)

Custom returns a new Config struct with information from environment variables and a custom config file.

func Default

func Default(getenv func(string) string) (Config, error)

Default returns a new Config struct with information from environment variables and the default config file (./config.yml).

type EnvironmentsNotSpecifiedError added in v0.6.0

type EnvironmentsNotSpecifiedError struct{}

func (EnvironmentsNotSpecifiedError) Error added in v0.6.0

type MissingParameterError added in v0.6.0

type MissingParameterError struct{}

func (MissingParameterError) Error added in v0.6.0

func (e MissingParameterError) Error() string

type ParseYamlError added in v0.6.0

type ParseYamlError struct {
	Err error
}

func (ParseYamlError) Error added in v0.6.0

func (e ParseYamlError) Error() string

Jump to

Keyboard shortcuts

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