overflow_commons_go/config/noauthprobe/NoAuthProbeConfig.go

23 lines
598 B
Go
Raw Normal View History

2017-12-01 09:44:28 +00:00
package noauthprobe
2017-12-01 09:31:54 +00:00
import "git.loafle.net/overflow/overflow_commons_go/util"
2017-12-01 11:00:51 +00:00
type NoAuthProbeStatType int
const (
NoAuthProbeStatTypeNotRegisterd NoAuthProbeStatType = iota
NoAuthProbeStatTypeRegisterd
)
2017-12-01 09:31:54 +00:00
type NoAuthProbeConfig struct {
TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"`
DenyDate *util.Timestamp `json:"denyDate,omitempty" yaml:"denyDate" toml:"denyDate"`
}
2017-12-01 11:00:51 +00:00
func (c *NoAuthProbeConfig) Stat() NoAuthProbeStatType {
if nil != c.TempKey && "" != *c.TempKey {
return NoAuthProbeStatTypeRegisterd
}
return NoAuthProbeStatTypeNotRegisterd
}