init
This commit is contained in:
commit
b10790c212
40 changed files with 4149 additions and 0 deletions
40
db/struct.go
Normal file
40
db/struct.go
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
package db
|
||||
|
||||
/*
|
||||
// 通用配置结构
|
||||
type CaddyfileConfig struct {
|
||||
Domain string `json:"domain"`
|
||||
TmplType string `json:"tmpl_type"`
|
||||
UpStream UpStreamConfig `json:"upstream"`
|
||||
FileServer FileServerConfig `json:"file_server"`
|
||||
Headers map[string][]string `json:"headers"`
|
||||
Log LogConfig `json:"log"`
|
||||
ErrorPage ErrorPageConfig `json:"error_page"`
|
||||
Encode EncodeConfig `json:"encode"`
|
||||
}
|
||||
|
||||
type UpStreamConfig struct {
|
||||
UpStream string `json:"upstream"`
|
||||
MutiUpStream bool `json:"muti_upstream"`
|
||||
UpStreams []string `json:"upstream_servers"`
|
||||
UpStreamHeaders map[string][]string `json:"upstream_headers"`
|
||||
}
|
||||
|
||||
type FileServerConfig struct {
|
||||
FileDirPath string `json:"file_dir_path"`
|
||||
EnableBrowser bool `json:"enable_browser"`
|
||||
}
|
||||
|
||||
type LogConfig struct {
|
||||
EnableLog bool `json:"enable_log"`
|
||||
LogDomain string `json:"log_domain"`
|
||||
}
|
||||
|
||||
type ErrorPageConfig struct {
|
||||
EnableErrorPage bool `json:"enable_error_page"`
|
||||
}
|
||||
|
||||
type EncodeConfig struct {
|
||||
EnableEncode bool `json:"enable_encode"`
|
||||
}
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue