2022-06-09 20:12:45 +00:00
|
|
|
package http
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2022-09-22 09:46:36 +00:00
|
|
|
"code.icb4dc0.de/prskr/nurse/check"
|
2022-06-09 20:12:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func Module() *check.Module {
|
2022-06-18 09:45:45 +00:00
|
|
|
m, err := check.NewModule(
|
2022-06-09 20:12:45 +00:00
|
|
|
"http",
|
|
|
|
check.WithCheck("get", check.FactoryFunc(func() check.SystemChecker {
|
|
|
|
return &GenericCheck{Method: http.MethodGet}
|
|
|
|
})),
|
|
|
|
check.WithCheck("post", check.FactoryFunc(func() check.SystemChecker {
|
|
|
|
return &GenericCheck{Method: http.MethodPost}
|
|
|
|
})),
|
|
|
|
check.WithCheck("put", check.FactoryFunc(func() check.SystemChecker {
|
|
|
|
return &GenericCheck{Method: http.MethodPut}
|
|
|
|
})),
|
|
|
|
check.WithCheck("delete", check.FactoryFunc(func() check.SystemChecker {
|
|
|
|
return &GenericCheck{Method: http.MethodDelete}
|
|
|
|
})),
|
|
|
|
)
|
2022-06-18 09:45:45 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2022-06-09 20:12:45 +00:00
|
|
|
return m
|
|
|
|
}
|