config

package
Version: v0.0.0-...-0bc30a8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VERSION string = "N/A"

VERSION will be set on build time

Functions

func ParseDistributionDirectory

func ParseDistributionDirectory(path string) error

ParseDistributionDirectory will walk through the specified directory, parses and includes configuration required by the front-end

Types

type Config

type Config struct {
	Develop    bool   `json:"develop"`
	Title      string `json:"title"`
	Proto      string `json:"proto"`
	RootDir    string `json:"rootDir"`
	ListenAddr string `json:"listenAddr"`
	NfqueueNum int    `json:"nfqueueNum"`
	Database   struct {
		Name     string `json:"name"`
		Password string `json:"password"`
		User     string `json:"user"`
		Addr     string `json:"addr"`
	} `json:"database"`
	ApiPath          string `json:"apiPath"`
	GeoIPDatabase    string `json:"geoIPDatabase"`
	PatternDirectory string `json:"patternDirectory"`
	Session          struct {
		Secret string `json:"secret"`
	} `json:"session"`
	Sentry struct {
		DSN string `json:"dsn"`
	} `json:"sentry"`
	Confd map[string]interface{} `json:"confd"`
}
var App Config

App represents the current application configuration

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig tries to parse the given JSON file into the Config struct

Source Files

Jump to

Keyboard shortcuts

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