()
| 23 | } |
| 24 | |
| 25 | func (q *Query) Validate() error { |
| 26 | parsedDur, err := time.ParseDuration(q.StepSizeStr) |
| 27 | if err != nil { |
| 28 | return err |
| 29 | } |
| 30 | |
| 31 | q.StepSize = parsedDur |
| 32 | |
| 33 | if q.StepSize == time.Duration(0) { |
| 34 | q.StepSize = time.Minute |
| 35 | } |
| 36 | return nil |
| 37 | } |
| 38 | |
| 39 | type Config struct { |
| 40 | Control Backend `yaml:"control" json:"control"` |
no outgoing calls
no test coverage detected