configuration

package
v0.0.0-...-9841d36 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadYAML

func LoadYAML(targetFormat interface{}, targetPath *string, targetFile *string, fromEnv []string) error

LoadYAML loads configuration from a mix of environment variables and a yaml file and coerce to given target structure.

Types

type AppConfiguration

type AppConfiguration struct {
	Env        string
	LogLevel   string `mapstructure:"log"`
	Port       int    `mapstructure:"port"`
	Repository *RepositoryConfiguration
	Services   *[]ServiceConfiguration
}

AppConfiguration contains application specific data.

func (*AppConfiguration) Validate

func (c *AppConfiguration) Validate() error

Validate performs basic validation on the contents of a configuration.

type RepositoryConfiguration

type RepositoryConfiguration struct {
	Adapter string
	Options map[string]interface{}
}

RepositoryConfiguration contains the adapter, as well as options for creating the specific repository type, if applicable.

type ServiceConfiguration

type ServiceConfiguration struct {
	Service string
	URI     string
}

Jump to

Keyboard shortcuts

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