Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
Types ¶
type Config ¶
type Config struct { Fs *FSConfig `json:"fs" yaml:"fs"` Secrets *Secrets `json:"secrets" yaml:"secrets"` Server *ServerCfg `json:"server" yaml:"server"` Users *UsersCfg `json:"users" yaml:"users"` Workers *WorkerPoolCfg `json:"workers" yaml:"workers"` Site *sitestore.SiteConfig `json:"site" yaml:"site"` }
type Secrets ¶
type Secrets struct {
TokenSecret string `json:"tokenSecret" yaml:"tokenSecret" cfg:"env"`
}
type ServerCfg ¶
type ServerCfg struct { Debug bool `json:"debug" yaml:"debug"` Host string `json:"host" yaml:"host"` Port int `json:"port" yaml:"port" cfg:"env"` ReadTimeout int `json:"readTimeout" yaml:"readTimeout"` WriteTimeout int `json:"writeTimeout" yaml:"writeTimeout"` MaxHeaderBytes int `json:"maxHeaderBytes" yaml:"maxHeaderBytes"` PublicPath string `json:"publicPath" yaml:"publicPath"` }
type UsersCfg ¶
type UsersCfg struct { EnableAuth bool `json:"enableAuth" yaml:"enableAuth"` DefaultAdmin string `json:"defaultAdmin" yaml:"defaultAdmin" cfg:"env"` DefaultAdminPwd string `json:"defaultAdminPwd" yaml:"defaultAdminPwd" cfg:"env"` CookieTTL int `json:"cookieTTL" yaml:"cookieTTL"` CookieSecure bool `json:"cookieSecure" yaml:"cookieSecure"` CookieHttpOnly bool `json:"cookieHttpOnly" yaml:"cookieHttpOnly"` MinUserNameLen int `json:"minUserNameLen" yaml:"minUserNameLen"` MinPwdLen int `json:"minPwdLen" yaml:"minPwdLen"` CaptchaWidth int `json:"captchaWidth" yaml:"captchaWidth"` CaptchaHeight int `json:"captchaHeight" yaml:"captchaHeight"` CaptchaEnabled bool `json:"captchaEnabled" yaml:"captchaEnabled"` UploadSpeedLimit int `json:"uploadSpeedLimit" yaml:"uploadSpeedLimit"` DownloadSpeedLimit int `json:"downloadSpeedLimit" yaml:"downloadSpeedLimit"` SpaceLimit int `json:"spaceLimit" yaml:"spaceLimit"` LimiterCapacity int `json:"limiterCapacity" yaml:"limiterCapacity"` LimiterCyc int `json:"limiterCyc" yaml:"limiterCyc"` PredefinedUsers []*userstore.UserCfg `json:"predefinedUsers" yaml:"predefinedUsers"` }
type WorkerPoolCfg ¶
Click to show internal directories.
Click to hide internal directories.