overflow_commons_go/config/noauthprobe/NoAuthProbeConfig.go
crusader d2d9803637 ing
2017-12-01 20:00:51 +09:00

23 lines
598 B
Go

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
}