nurse/protocols/http/validation.go

20 lines
375 B
Go
Raw Normal View History

2022-06-09 22:12:45 +02:00
package http
import (
"net/http"
2022-09-22 11:46:36 +02:00
"code.icb4dc0.de/prskr/nurse/validation"
2022-06-09 22:12:45 +02: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)
})
}