Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DebugFlag bool
Functions ¶
func GetConfigDir ¶
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
Click to show internal directories.
Click to hide internal directories.