config

package
v6.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TrafficMonitor TrafficMonitor `json:"trafficMonitor"`
	Default        Default        `json:"default"`
}

Config reflects the structure of the test-to-api.conf file

func LoadConfig

func LoadConfig(confPath string) (Config, error)

LoadConfig - reads the config file into the Config struct

func (Config) DebugLog

func (c Config) DebugLog() log.LogLocation

DebugLog - troubleshooting messages

func (Config) ErrorLog

func (c Config) ErrorLog() log.LogLocation

ErrorLog - critical messages

func (Config) EventLog

func (c Config) EventLog() log.LogLocation

EventLog - access.log high level transactions

func (Config) InfoLog

func (c Config) InfoLog() log.LogLocation

InfoLog - information messages

func (Config) WarningLog

func (c Config) WarningLog() log.LogLocation

WarningLog - warning messages

type Default

type Default struct {
	Session Session   `json:"session"`
	Log     Locations `json:"logLocations"`
}

Default - config section

type Locations

type Locations struct {
	Debug   string `json:"debug"`
	Event   string `json:"event"`
	Error   string `json:"error"`
	Info    string `json:"info"`
	Warning string `json:"warning"`
}

Locations - reflects the structure of the database.conf file

type Session

type Session struct {
	TimeoutInSecs int `json:"timeoutInSecs" envconfig:"SESSION_TIMEOUT_IN_SECS"`
}

Session - config section

type TrafficMonitor

type TrafficMonitor struct {
	// URL points to the Traffic Monitor instance being tested
	URL string `json:"url" envconfig:"TM_URL"`
}

TrafficMonitor is the monitor config section.

Jump to

Keyboard shortcuts

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