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 *db.SiteConfig `json:"site" yaml:"site"` Db *DbConfig `json:"db" yaml:"db"` }
func DefaultConfigStruct ¶ added in v0.5.3
func DefaultConfigStruct() *Config
type DbConfig ¶ added in v0.5.3
type DbConfig struct {
DbPath string `json:"dbPath" yaml:"dbPath"`
}
type MockClient ¶ added in v0.10.1
type MockClient struct {
// contains filtered or unexported fields
}
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"` SearchResultLimit int `json:"searchResultLimit" yaml:"searchResultLimit"` InitFileIndex bool `json:"initFileIndex" yaml:"initFileIndex"` }
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 []*db.UserCfg `json:"predefinedUsers" yaml:"predefinedUsers"` }
type WorkerPoolCfg ¶
Click to show internal directories.
Click to hide internal directories.