|
@@ -2,25 +2,17 @@ package v1
|
|
|
|
|
|
type GlobalLimitRequest struct {
|
|
|
Uid int `json:"uid" form:"uid" binding:"required"`
|
|
|
- HostId int `json:"host_id" form:"host_id" binding:"required"`
|
|
|
+ HostId int `json:"hostId" form:"hostId" binding:"required"`
|
|
|
Comment string `json:"comment" form:"comment" binding:"required"`
|
|
|
}
|
|
|
type GlobalLimitEditRequest struct {
|
|
|
Uid int `json:"uid" form:"uid" binding:"required"`
|
|
|
- HostId int `json:"host_id" form:"host_id" binding:"required"`
|
|
|
- RuleId int `json:"rule_id" form:"rule_id" binding:"required"`
|
|
|
+ HostId int `json:"hostId" form:"hostId" binding:"required"`
|
|
|
+ RuleId int `json:"ruleId" form:"ruleId" binding:"required"`
|
|
|
Comment string `json:"comment" form:"comment" binding:"required"`
|
|
|
ExpiredAt int64 `json:"expired_at" form:"expired_at" binding:"required"`
|
|
|
}
|
|
|
|
|
|
-type GlobalLimitSendRequest struct {
|
|
|
- Tag string `json:"tag" form:"tag" binding:"required"`
|
|
|
- Bps string `form:"bps" json:"bps" default:"0"`
|
|
|
- MaxBytesMonth string `form:"max_bytes_month" json:"max_bytes_month" default:"0"`
|
|
|
- ExpiredAt string `form:"expired_at" json:"expired_at omitempty"`
|
|
|
- Comment string `form:"comment" json:"comment"`
|
|
|
-}
|
|
|
-
|
|
|
type GlobalLimitRequireResponse struct {
|
|
|
ExpiredAt string
|
|
|
GlobalLimitName string
|
|
@@ -33,9 +25,9 @@ type GlobalLimitRequireResponse struct {
|
|
|
|
|
|
type GeneralLimitRequireRequest struct {
|
|
|
Uid int `json:"uid" form:"uid" binding:"required"`
|
|
|
- HostId int `json:"host_id" form:"host_id" binding:"required"`
|
|
|
+ HostId int `json:"hostId" form:"hostId" binding:"required"`
|
|
|
Tag string `json:"tag" form:"tag" binding:"required"`
|
|
|
- RuleId int `json:"rule_id" form:"rule_id" binding:"required"`
|
|
|
+ RuleId int `json:"ruleId" form:"ruleId" binding:"required"`
|
|
|
}
|
|
|
|
|
|
type AccessRules struct {
|
|
@@ -50,8 +42,8 @@ type AccessRuleRules struct {
|
|
|
}
|
|
|
|
|
|
type GlobalLimitExpired struct {
|
|
|
- HostId int `json:"host_id" form:"host_id" gorm:"column:host_id"`
|
|
|
- RuleId int `json:"rule_id" form:"rule_id" gorm:"column:rule_id"`
|
|
|
+ HostId int `json:"hostId" form:"hostId" gorm:"column:host_id"`
|
|
|
+ RuleId int `json:"ruleId" form:"ruleId" gorm:"column:rule_id"`
|
|
|
Comment string `json:"comment" form:"comment" gorm:"column:comment"`
|
|
|
}
|
|
|
|
|
@@ -62,10 +54,6 @@ type GlobalLimitExpiredByHost struct {
|
|
|
}
|
|
|
|
|
|
|
|
|
-type GlobalLimitExpiredBySnail struct {
|
|
|
- HostId int `json:"host_id" form:"host_id" gorm:"column:waf_common_limit_id"`
|
|
|
- ExpiredAt int64 `json:"expired_at" form:"expired_at" gorm:"column:expired_at"`
|
|
|
-}
|
|
|
|
|
|
type UserInfo struct {
|
|
|
Username string `json:"username" form:"username"`
|