AlertingNG: Unified alerting API mock (#32040)

* AlertingNG: Alertmanager mock API

* AlertingNG: Remove permissions API routes

* Add example POST payloads

* Prometheus and testing mock API
This commit is contained in:
Sofia Papagiannaki
2021-03-17 12:47:03 +02:00
committed by GitHub
parent ee8a864615
commit 68b05b8aaa
14 changed files with 1525 additions and 59 deletions
+14
View File
@@ -3,6 +3,8 @@ package api
import (
"fmt"
"regexp"
"github.com/go-openapi/strfmt"
)
var searchRegex = regexp.MustCompile(`\{(\w+)\}`)
@@ -13,3 +15,15 @@ func toMacaronPath(path string) string {
return []byte(fmt.Sprintf(":%s", m))
}))
}
func timePtr(t strfmt.DateTime) *strfmt.DateTime {
return &t
}
func stringPtr(s string) *string {
return &s
}
func boolPtr(b bool) *bool {
return &b
}