24 lines
404 B
Go
24 lines
404 B
Go
package config
|
|
|
|
const (
|
|
ConfigFileName = "config.json"
|
|
)
|
|
|
|
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
|
|
}
|