config

package
v0.0.0-...-b6b44b7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfJSON

type ConfJSON struct {
	Core SectionCore `json:"core"`
	Log  SectionLog  `json:"log"`
}

ConfJSON is config struct

func LoadConf

func LoadConf(prefix string, configPath string) (ConfJSON, error)

LoadConf load the config settings

type KV

type KV map[string]string

KV key value type

type SectionCore

type SectionCore struct {
	Debug   bool   `json:"debug"`
	Address string `json:"address"`
	Port    int    `json:"port"`
}

SectionCore is sub section of config

type SectionLog

type SectionLog struct {
	Format      string `json:"format"`
	AccessLog   string `json:"access_log"`
	AccessLevel string `json:"access_level"`
	ErrorLog    string `json:"error_log"`
	ErrorLevel  string `json:"error_level"`
	SentryDSN   string `json:"sentry_dsn"`
}

SectionLog is sub section of config.

Jump to

Keyboard shortcuts

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