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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user