Files
EdgeCommon/pkg/serverconfigs/bandwidth_limit_status.go
2021-10-21 17:09:59 +08:00

18 lines
464 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package serverconfigs
import timeutil "github.com/iwind/TeaGo/utils/time"
// BandwidthLimitStatus 带宽限制状态
type BandwidthLimitStatus struct {
UntilDay string `yaml:"untilDay" json:"untilDay"` // 有效日期格式YYYYMMDD
}
func (this *BandwidthLimitStatus) IsValid() bool {
if len(this.UntilDay) == 0 {
return false
}
return this.UntilDay >= timeutil.Format("Ymd")
}