2022-06-09 20:12:45 +00:00
|
|
|
package http
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2022-08-02 18:45:09 +00:00
|
|
|
"code.1533b4dc0.de/prskr/nurse/validation"
|
2022-06-09 20:12:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var registry = validation.NewRegistry[*http.Response]()
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
registry.Register("jsonpath", func() validation.FromCall[*http.Response] {
|
|
|
|
return new(JSONPathValidator)
|
|
|
|
})
|
|
|
|
|
|
|
|
registry.Register("status", func() validation.FromCall[*http.Response] {
|
|
|
|
return new(StatusValidator)
|
|
|
|
})
|
|
|
|
}
|