cnf

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAndDefaults

func ValidateAndDefaults(conf *Conf)

Types

type Conf

type Conf struct {
	ListenAddress          string             `json:"listenAddress"`
	ListenPort             int                `json:"listenPort"`
	ServerReadTimeoutSecs  int                `json:"serverReadTimeoutSecs"`
	ServerWriteTimeoutSecs int                `json:"serverWriteTimeoutSecs"`
	CorsAllowedOrigins     []string           `json:"corsAllowedOrigins"`
	Corpora                engine.CorporaConf `json:"corpora"`
	DB                     *engine.DBConf     `json:"db"`
	LogFile                string             `json:"logFile"`
	LogLevel               logging.LogLevel   `json:"logLevel"`
	Language               string             `json:"language"`
	TimeZone               string             `json:"timeZone"`
	// contains filtered or unexported fields
}

Conf is a global configuration of the app

func LoadConfig

func LoadConfig(path string) *Conf

func (*Conf) GetSourcePath

func (conf *Conf) GetSourcePath() string

GetSourcePath returns an absolute path of a file the config was loaded from.

func (*Conf) IsDebugMode

func (conf *Conf) IsDebugMode() bool

func (*Conf) TimezoneLocation

func (conf *Conf) TimezoneLocation() *time.Location

Jump to

Keyboard shortcuts

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