ing
This commit is contained in:
parent
2ffbb7f711
commit
d2d9803637
|
@ -2,7 +2,21 @@ package noauthprobe
|
||||||
|
|
||||||
import "git.loafle.net/overflow/overflow_commons_go/util"
|
import "git.loafle.net/overflow/overflow_commons_go/util"
|
||||||
|
|
||||||
|
type NoAuthProbeStatType int
|
||||||
|
|
||||||
|
const (
|
||||||
|
NoAuthProbeStatTypeNotRegisterd NoAuthProbeStatType = iota
|
||||||
|
NoAuthProbeStatTypeRegisterd
|
||||||
|
)
|
||||||
|
|
||||||
type NoAuthProbeConfig struct {
|
type NoAuthProbeConfig struct {
|
||||||
TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"`
|
TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"`
|
||||||
DenyDate *util.Timestamp `json:"denyDate,omitempty" yaml:"denyDate" toml:"denyDate"`
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user