Discover Packages
chapper.dev/server
internal
config
package
Version:
v0.0.0-...-0ddd045
Opens a new window with list of versions in this module.
Published: Jan 4, 2021
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package config provides the top-level config struct
New returns a new config struct
NewDefault returns a default config
Read reads a .toml config file from path and returns a config struct or an error
Validate validates the config
type GeneralOptions struct {
Name string `toml:"NAME"`
EnableRegister bool `toml:"ENABLE_REGISTER"`
DisableBanner bool `toml:"DISABLE_BANNER"`
}
type LogOptions struct {
Path string `toml:"PATH"`
Prefix string `toml:"PREFIX"`
}
type RouterOptions struct {
Port int `toml:"PORT"`
Domain string `toml:"DOMAIN"`
WebPath string `toml:"WEB_PATH"`
AvatarPath string `toml:"AVATAR_PATH"`
JWTSecret string `toml:"JWT_SIGNING_KEY"`
OTPIssuer string `toml:"OTP_ISSUER"`
EnableGZIP bool `toml:"ENABLE_GZIP"`
}
type StoreOptions struct {
User string `toml:"USER"`
Password string `toml:"PASSWORD"`
Database string `toml:"DATABASE"`
Host string `toml:"HOST"`
Port int `toml:"PORT"`
}
type TurnOptions struct {
Domain string `toml:"DOMAIN"`
PublicIP string `toml:"PUBLIC_IP"`
Port int `toml:"PORT"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.