From d2d9803637306d0ef996032d6c089b3e9ebf1478 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 1 Dec 2017 20:00:51 +0900 Subject: [PATCH] ing --- config/noauthprobe/NoAuthProbeConfig.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/noauthprobe/NoAuthProbeConfig.go b/config/noauthprobe/NoAuthProbeConfig.go index ee1554c..1be1c36 100644 --- a/config/noauthprobe/NoAuthProbeConfig.go +++ b/config/noauthprobe/NoAuthProbeConfig.go @@ -2,7 +2,21 @@ 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 +}