overflow_commons_go/config/noauthprobe/NoAuthProbeConfig.go
crusader 4f8577a547 ing
2017-12-01 21:25:57 +09:00

23 lines
552 B
Go

package noauthprobe
import "time"
type NoAuthProbeStateType int
const (
NoAuthProbeStateTypeNotRegisterd NoAuthProbeStateType = iota
NoAuthProbeStateTypeRegisterd
)
type NoAuthProbeConfig struct {
TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"`
DenyDate *time.Time `json:"denyDate,omitempty" yaml:"denyDate" toml:"denyDate"`
}
func (c *NoAuthProbeConfig) State() NoAuthProbeStateType {
if nil != c.TempKey && "" != *c.TempKey {
return NoAuthProbeStateTypeRegisterd
}
return NoAuthProbeStateTypeNotRegisterd
}