config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Mocks  Mocks  `mapstructure:"mocks"`
	Server Server `mapstructure:"server"`
}

Configuration is the parent struct that holds the configuration itself. Mocks is the configuration for the mocks.

func NewConfiguration

func NewConfiguration(file string) (cfg Configuration, err error)

NewConfiguration creates the base configuration from the file specified or the default located in the same directory as the executable or in the current directory.

type Mocks

type Mocks struct {
	Dir string `mapstructure:"dir"`
}

Mocks Dir is the directory containing all the mocks that will be served. Default: mockdata

type Server

type Server struct {
	Host string `mapstructure:"host"`
	Port uint16 `mapstructure:"port"`
}

Configuration is the parent struct that holds the configuration itself. Mocks is the configuration for the mocks.

Jump to

Keyboard shortcuts

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