mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-03-06 03:35:37 +08:00
套餐增加请求数(日/月)限制
This commit is contained in:
@@ -4,11 +4,19 @@ package serverconfigs
|
||||
|
||||
import timeutil "github.com/iwind/TeaGo/utils/time"
|
||||
|
||||
type TrafficLimitTarget = string
|
||||
|
||||
const (
|
||||
TrafficLimitTargetTraffic TrafficLimitTarget = "traffic"
|
||||
TrafficLimitTargetRequest TrafficLimitTarget = "request"
|
||||
)
|
||||
|
||||
// TrafficLimitStatus 流量限制状态
|
||||
type TrafficLimitStatus struct {
|
||||
UntilDay string `yaml:"untilDay" json:"untilDay"` // 有效日期,格式YYYYMMDD
|
||||
PlanId int64 `yaml:"planId" json:"planId"` // 套餐ID
|
||||
DateType string `yaml:"dateType" json:"dateType"` // 日期类型 day|month
|
||||
UntilDay string `yaml:"untilDay" json:"untilDay"` // 有效日期,格式YYYYMMDD
|
||||
PlanId int64 `yaml:"planId" json:"planId"` // 套餐ID
|
||||
DateType string `yaml:"dateType" json:"dateType"` // 日期类型 day|month
|
||||
TargetType string `yaml:"targetType" json:"targetType"` // 限制类型:traffic|request|...
|
||||
}
|
||||
|
||||
func (this *TrafficLimitStatus) IsValid() bool {
|
||||
|
||||
Reference in New Issue
Block a user