ing
This commit is contained in:
parent
9aae5d8821
commit
fb2a8b7f18
|
@ -1,5 +1,19 @@
|
||||||
package probe
|
package probe
|
||||||
|
|
||||||
|
type ProbeStateType int
|
||||||
|
|
||||||
|
const (
|
||||||
|
ProbeStateTypeNotAuthorized ProbeStateType = iota
|
||||||
|
ProbeStateTypeAuthorized
|
||||||
|
)
|
||||||
|
|
||||||
type ProbeConfig struct {
|
type ProbeConfig struct {
|
||||||
Key *string `json:"key,omitempty" yaml:"key" toml:"key"`
|
Key *string `json:"key,omitempty" yaml:"key" toml:"key"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *ProbeConfig) State() ProbeStateType {
|
||||||
|
if nil != c.Key && "" != *c.Key {
|
||||||
|
return ProbeStateTypeAuthorized
|
||||||
|
}
|
||||||
|
return ProbeStateTypeNotAuthorized
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user