overflow_commons_go/config/noauthprobe/NoAuthProbeConfig.go
crusader 884138dbd7 ing
2017-12-01 20:02:32 +09:00

23 lines
606 B
Go

package noauthprobe
import "git.loafle.net/overflow/overflow_commons_go/util"
type NoAuthProbeStateType int
const (
NoAuthProbeStateTypeNotRegisterd NoAuthProbeStateType = iota
NoAuthProbeStateTypeRegisterd
)
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) State() NoAuthProbeStateType {
if nil != c.TempKey && "" != *c.TempKey {
return NoAuthProbeStateTypeRegisterd
}
return NoAuthProbeStateTypeNotRegisterd
}