2018-04-26 07:37:59 +00:00
|
|
|
package probe
|
2018-04-12 06:11:54 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|