Documentation ¶
Index ¶
- func CreateServer(addr string, handlers func(x *mux.Router), options Options) *http.Server
- func GenerateBearerToken(key string, subject string, expires time.Time) (string, error)
- func HealthHandlerFunctionWithChecks(w http.ResponseWriter, _ *http.Request, checks []HealthCheck)
- func SetUpMockServer(key string, path string) *http.Server
- func StartServer(server *http.Server, l net.Listener)
- func StopServer(server *http.Server)
- func WaitForHealthy(server *http.Server)
- func WaitForHealthyWithClient(server *http.Server, client httpClient, url string)
- type HealthCheck
- type NoopCheck
- type Options
- type Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateServer ¶
func GenerateBearerToken ¶
func HealthHandlerFunctionWithChecks ¶
func HealthHandlerFunctionWithChecks(w http.ResponseWriter, _ *http.Request, checks []HealthCheck)
func SetUpMockServer ¶ added in v0.62.1
This is a mock server that simply returns the http request infor as an OPA input structure to the requesting client. Main purpose is to test how OpaInput works against http.Request
func StopServer ¶
func WaitForHealthy ¶
Types ¶
type HealthCheck ¶
type Options ¶
type Options struct {
HealthChecks []HealthCheck
}
Click to show internal directories.
Click to hide internal directories.