config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCupConfigPath = "./cupconf.yaml"

Variables

View Source
var FilePath string

Functions

func GetValidLogLevels

func GetValidLogLevels() []string

func LogLevelToString

func LogLevelToString(level log.Level) string

func StringToLogLevel

func StringToLogLevel(str string) log.Level

Types

type ApiConfig

type ApiConfig struct {
	ApiBaseUrl string `json:"apiBaseUrl"`
	ApiKey     string `json:"apiKey"`
}

type CupConfig

type CupConfig struct {
	LogLevel               string                   `json:"logLevel"`
	API                    ApiConfig                `json:"api"`
	Domains                []DomainConfig           `json:"domains"`
	SimpleIPReportServices []SimpleIPReporterConfig `json:"simpleIpReportServices"`
}
var C CupConfig

func GetDefaultCupConfig

func GetDefaultCupConfig() CupConfig

type DomainConfig

type DomainConfig struct {
	Domain string   `json:"domain"`
	Hosts  []string `json:"hosts"`
}

type SimpleIPReporterConfig

type SimpleIPReporterConfig struct {
	IPv4ApiBase string `json:"ipv4ApiBase"`
	ServiceName string `json:"serviceName"`
}

Jump to

Keyboard shortcuts

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