This commit is contained in:
crusader 2017-12-01 20:02:32 +09:00
parent d2d9803637
commit 884138dbd7

View File

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