ing
This commit is contained in:
parent
eadd089426
commit
354edcc78a
19
config/probe/probe.go
Normal file
19
config/probe/probe.go
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user