2022-12-09 17:16:07 +08:00
|
|
|
package request
|
|
|
|
|
2022-12-13 18:54:46 +08:00
|
|
|
import "github.com/1Panel-dev/1Panel/backend/app/dto"
|
|
|
|
|
2022-12-09 17:16:07 +08:00
|
|
|
type NginxConfigFileUpdate struct {
|
2023-08-02 22:38:32 +08:00
|
|
|
Content string `json:"content" validate:"required"`
|
2023-11-03 18:19:45 +08:00
|
|
|
Backup bool `json:"backup"`
|
2022-12-09 17:16:07 +08:00
|
|
|
}
|
2022-12-13 18:54:46 +08:00
|
|
|
|
|
|
|
type NginxScopeReq struct {
|
|
|
|
Scope dto.NginxKey `json:"scope" validate:"required"`
|
|
|
|
WebsiteID uint `json:"websiteId"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NginxConfigUpdate struct {
|
|
|
|
Scope dto.NginxKey `json:"scope"`
|
|
|
|
Operate string `json:"operate" validate:"required;oneof=add update delete"`
|
|
|
|
WebsiteID uint `json:"websiteId" validate:"required"`
|
|
|
|
Params interface{} `json:"params"`
|
|
|
|
}
|
2023-04-14 16:01:06 +08:00
|
|
|
|
|
|
|
type NginxRewriteReq struct {
|
|
|
|
WebsiteID uint `json:"websiteId" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NginxRewriteUpdate struct {
|
|
|
|
WebsiteID uint `json:"websiteId" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Content string `json:"content" validate:"required"`
|
|
|
|
}
|
2023-04-24 17:48:22 +08:00
|
|
|
|
|
|
|
type NginxProxyUpdate struct {
|
|
|
|
WebsiteID uint `json:"websiteID" validate:"required"`
|
|
|
|
Content string `json:"content" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
}
|
2023-04-25 18:10:17 +08:00
|
|
|
|
|
|
|
type NginxAuthUpdate struct {
|
|
|
|
WebsiteID uint `json:"websiteID" validate:"required"`
|
|
|
|
Operate string `json:"operate" validate:"required"`
|
|
|
|
Username string `json:"username" validate:"required"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NginxAuthReq struct {
|
|
|
|
WebsiteID uint `json:"websiteID" validate:"required"`
|
|
|
|
}
|
2023-05-26 10:40:21 +08:00
|
|
|
|
|
|
|
type NginxCommonReq struct {
|
|
|
|
WebsiteID uint `json:"websiteID" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NginxAntiLeechUpdate struct {
|
|
|
|
WebsiteID uint `json:"websiteID" validate:"required"`
|
|
|
|
Extends string `json:"extends" validate:"required"`
|
|
|
|
Return string `json:"return" validate:"required"`
|
2023-11-03 18:19:45 +08:00
|
|
|
Enable bool `json:"enable" `
|
2023-05-26 10:40:21 +08:00
|
|
|
ServerNames []string `json:"serverNames"`
|
|
|
|
Cache bool `json:"cache"`
|
|
|
|
CacheTime int `json:"cacheTime"`
|
|
|
|
CacheUint string `json:"cacheUint"`
|
|
|
|
NoneRef bool `json:"noneRef"`
|
|
|
|
LogEnable bool `json:"logEnable"`
|
|
|
|
Blocked bool `json:"blocked"`
|
|
|
|
}
|
2023-07-22 22:02:21 +08:00
|
|
|
|
|
|
|
type NginxRedirectReq struct {
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
WebsiteID uint `json:"websiteID" validate:"required"`
|
|
|
|
Domains []string `json:"domains"`
|
2023-11-03 18:19:45 +08:00
|
|
|
KeepPath bool `json:"keepPath"`
|
|
|
|
Enable bool `json:"enable"`
|
2023-07-22 22:02:21 +08:00
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Redirect string `json:"redirect" validate:"required"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Target string `json:"target" validate:"required"`
|
|
|
|
Operate string `json:"operate" validate:"required"`
|
|
|
|
RedirectRoot bool `json:"redirectRoot"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NginxRedirectUpdate struct {
|
|
|
|
WebsiteID uint `json:"websiteID" validate:"required"`
|
|
|
|
Content string `json:"content" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
}
|