Documentation ¶
Overview ¶
group functions concerned with parsing config for non-core infra
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ DBConfig: DBConfig{ Engine: "postgres", Host: "localhost", Port: uint16(5432), Database: "librate", TestDB: "librate_test", User: "postgres", Password: "postgres", SSL: "unknown", PG_Config: "/usr/bin/pg_config", StartCmd: "sudo service postgresql start", }, Fiber: FiberConfig{ Host: "localhost", Port: 3000, }, Secret: "secret", LibrateEnv: "production", }
Functions ¶
func LoadConfig ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct { AuthMountPoint string `yaml:"auth_mount_point", default:"/auth"` AuthCookieName string `yaml:"auth_cookie_name", default:"auth"` AuthCookiePath string `yaml:"auth_cookie_path", default:"/"` AuthCookieSecure bool `yaml:"auth_cookie_secure", default:"false"` AuthCookieHTTPOnly bool `yaml:"auth_cookie_http_only", default:"true"` AuthCookieDomain string `yaml:"auth_cookie_domain", default:""` AuthCookieExpire int `yaml:"auth_cookie_expire", default:"3600"` }
type Config ¶
type Config struct { DBConfig `json:"database,omitempty" yaml:"database" mapstructure:"database"` Fiber FiberConfig `json:"fiber,omitempty" yaml:"fiber" mapstructure:"fiber"` Secret string `json:"secret,omitempty" yaml:"secret" mapstructure:"secret"` // default to production for security reasons LibrateEnv string `json:"librate_env,omitempty" yaml:"librate_env" default:"production" mapstructure:"librate_env"` }
type DBConfig ¶
type DBConfig struct { Engine string `yaml:"engine" default:"postgres"` Host string `yaml:"host" default:"localhost"` Port uint16 `yaml:"port" default:"5432"` Database string `yaml:"database" default:"librate"` TestDB string `yaml:"test_database" default:"librate_test"` User string `yaml:"user" default:"postgres"` Password string `yaml:"password,omitempty" default:"postgres"` SSL string `yaml:"SSL" default:"unknown"` PG_Config string `yaml:"pg_config,omitempty" default:"/usr/bin/pg_config"` // WARN: might probably need to be changed for containerized environments StartCmd string `yaml:"start_cmd,omitempty" default:"sudo service postgresql start"` }
type FiberConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.