Documentation ¶
Index ¶
- func GetNotFoundFunc() func(w http.ResponseWriter, r *http.Request)
- func GetRequestErrorFunc() func(w http.ResponseWriter, r *http.Request, err error)
- func GetResponseErrorFunc() func(w http.ResponseWriter, r *http.Request, err error)
- func GracefulShutdown(srv *http.Server) error
- func RunServer(ctx context.Context, address string, ...) error
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNotFoundFunc ¶
func GetNotFoundFunc() func(w http.ResponseWriter, r *http.Request)
GetNotFoundFunc is used to override the default 404 response which is a text only reply so that we can respond with the required JSON body.
func GetRequestErrorFunc ¶
func GetRequestErrorFunc() func(w http.ResponseWriter, r *http.Request, err error)
GetRequestErrorFunc override default validation errors to allow for O-RAN specific struct
func GetResponseErrorFunc ¶
func GetResponseErrorFunc() func(w http.ResponseWriter, r *http.Request, err error)
GetResponseErrorFunc override default internal server error to allow for O-RAN specific struct
func GracefulShutdown ¶
GracefulShutdown allow graceful shutdown with timeout
Types ¶
type Middleware ¶
func GetLogDurationFunc ¶
func GetLogDurationFunc() Middleware
GetLogDurationFunc log time taken to complete a request.
func GetOpenAPIValidationFunc ¶
func GetOpenAPIValidationFunc(swagger *openapi3.T) Middleware
GetOpenAPIValidationFunc to validate all incoming requests as specified in the spec
Click to show internal directories.
Click to hide internal directories.