config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigurationFilePath = "config/config.yml"
)

Variables

View Source
var (
	// ErrNoServiceInConfig is an error returned when a configuration file has no services configured
	ErrNoServiceInConfig = errors.New("configuration file should contain at least 1 service")

	// ErrConfigFileNotFound is an error returned when the configuration file could not be found
	ErrConfigFileNotFound = errors.New("configuration file not found")

	// ErrConfigNotLoaded is an error returned when an attempt to Get() the configuration before loading it is made
	ErrConfigNotLoaded = errors.New("configuration is nil")

	// ErrInvalidSecurityConfig is an error returned when the security configuration is invalid
	ErrInvalidSecurityConfig = errors.New("invalid security configuration")
)

Functions

func Load

func Load(configFile string) error

Types

type Config

type Config struct {
	Exchange      *exchange.Config `mapstructure:"exchange"`
	Database      *database.Config `mapstructure:"database"`
	DeleteOldSnap bool             `mapstructure:"deleteOldSnap"`
	Alerting      *alerting.Config `mapstructure:"alerting"`
}

func Get

func Get() *Config

Jump to

Keyboard shortcuts

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