This commit is contained in:
crusader 2017-12-01 20:00:51 +09:00
parent 2ffbb7f711
commit d2d9803637

View File

@ -2,7 +2,21 @@ package noauthprobe
import "git.loafle.net/overflow/overflow_commons_go/util"
type NoAuthProbeStatType int
const (
NoAuthProbeStatTypeNotRegisterd NoAuthProbeStatType = iota
NoAuthProbeStatTypeRegisterd
)
type NoAuthProbeConfig struct {
TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"`
DenyDate *util.Timestamp `json:"denyDate,omitempty" yaml:"denyDate" toml:"denyDate"`
}
func (c *NoAuthProbeConfig) Stat() NoAuthProbeStatType {
if nil != c.TempKey && "" != *c.TempKey {
return NoAuthProbeStatTypeRegisterd
}
return NoAuthProbeStatTypeNotRegisterd
}