conditions.go 553 B

1234567891011121314151617181920212223242526272829303132
  1. package alerting
  2. import "github.com/grafana/grafana/pkg/components/simplejson"
  3. type AlertCondition interface {
  4. Eval()
  5. }
  6. type QueryCondition struct {
  7. Query AlertQuery
  8. Reducer AlertReducerModel
  9. Evaluator AlertEvaluatorModel
  10. }
  11. func (c *QueryCondition) Eval() {
  12. }
  13. type AlertReducerModel struct {
  14. Type string
  15. Params []interface{}
  16. }
  17. type AlertEvaluatorModel struct {
  18. Type string
  19. Params []interface{}
  20. }
  21. func NewQueryCondition(model *simplejson.Json) (*QueryCondition, error) {
  22. condition := QueryCondition{}
  23. return &condition, nil
  24. }