This commit is contained in:
crusader 2018-04-12 15:11:54 +09:00
parent eadd089426
commit 354edcc78a

19
config/probe/probe.go Normal file
View File

@ -0,0 +1,19 @@
package probe
type ProbeStateType int
const (
ProbeStateTypeNotAuthorized ProbeStateType = iota
ProbeStateTypeAuthorized
)
type Probe struct {
Key *string `json:"key,omitempty" yaml:"key" toml:"key"`
}
func (c *Probe) State() ProbeStateType {
if nil != c.Key && "" != *c.Key {
return ProbeStateTypeAuthorized
}
return ProbeStateTypeNotAuthorized
}