Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
Types ¶
type Config ¶
type Config struct {
Users *UsersCfg `json:"users" yaml:"users"`
Fs *FSConfig `json:"fs" yaml:"fs"`
Secrets *Secrets `json:"secrets" yaml:"secrets"`
Workers *WorkerPoolCfg `json:"workers" yaml:"workers"`
Db *DbConfig `json:"db" yaml:"db"`
Server *ServerCfg `json:"server" yaml:"server"`
}
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 FSConfig ¶
type FSConfig struct {
Root string `json:"root" yaml:"root"`
OpensLimit int `json:"opensLimit" yaml:"opensLimit"`
OpenTTL int `json:"openTTL" yaml:"openTTL"`
PublicPath string `json:"publicPath" yaml:"publicPath"`
SearchResultLimit int `json:"searchResultLimit" yaml:"searchResultLimit"`
InitFileIndex bool `json:"initFileIndex" yaml:"initFileIndex"`
}
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"`
Dynamic *db.SiteConfig `json:"dynamic" yaml:"dynamic"`
}
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.