config

package
v0.0.0-...-975d13b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugFlag bool

Functions

func GetConfigDir

func GetConfigDir(localDir string) string

Types

type Configuration

type Configuration struct {
	DB struct {
		DB       string `toml:"db" env:"GOBOOK_DB" env-default:"sqlite"`
		User     string `toml:"user" env:"GOBOOK_DB_USER" env-default:"root"`
		Password string `toml:"password" env:"GOBOOK_DB_PASSWORD"`
		Port     int    `toml:"port" env:"GOBOOK_DB_PORT" env-default:"3307"`
		Host     string `toml:"host" env:"GOBOOK_DB_HOST" env-default:"localhost"`
		Name     string `toml:"name" env:"GOBOOK_DB_NAME"`
	} `toml:"db"`
	GlobalConfiguration GlobalConfiguration `toml:"global"`
}

func GetConfig

func GetConfig() *Configuration

type GlobalConfiguration

type GlobalConfiguration struct {
	ServerPort                 int `toml:"server_port" env:"GOBOOK_SERVER_PORT" env-default:"3000"`
	CashFlowLimit              int `toml:"cashflow_limit"`
	LimitImportPayeeNameLength bool
	Sessions                   bool
	UpdateAccountsOnLogin      bool
	// booleans must default to false, see cleanenv #61,#82
	EnableSecurityCharts         bool `toml:"enable_security_charts"`
	EnableSecurityFilings        bool `toml:"enable_security_filings"`
	DisableAutoTaxes             bool `toml:"disable_auto_taxes"`
	DisableImportPayeeNameLength bool `toml:"disable_import_payee_name_length"`
	DisableSessions              bool `toml:"disable_sessions"`
	DisableUpdateAccountsOnLogin bool `toml:"disable_update_accounts_on_login"`
	EnableImportTradeFixups      bool `toml:"enable_import_trade_fixups"`
}

func GlobalConfig

func GlobalConfig() *GlobalConfiguration

Jump to

Keyboard shortcuts

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