23 lines
598 B
Go
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
|
|
}
|