middleware

package
v0.0.0-...-76e4eaa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package middleware provides functions to modify the context of a htttp request or response

Index

Constants

View Source
const AuthorizationHeader = "Authorization"
View Source
const ContentTypeHeader = "Content-Type"
View Source
const UserAgentHeader = "User-Agent"

Variables

This section is empty.

Functions

func Database

func Database(context *apimodels.APIContext) *verrors.APIError

func Request

func Request(r *http.Request, context *apimodels.APIContext) *verrors.APIError

Request handler middleware function

func Response

func Response(context *apimodels.APIContext, writer http.ResponseWriter)

Response handle middleware function

func Security

func Security(context *apimodels.APIContext) *verrors.APIError

func SendResponse

func SendResponse(w http.ResponseWriter, status int, response interface{}, contentType apimodels.MimeType)

SendResponse sens a HTTP response

func Trazability

func Trazability(context *apimodels.APIContext) *verrors.APIError

Types

type EmptyResponse

type EmptyResponse struct{}

EmptyResponse struct represents an empty response

type Middleware

type Middleware func(context *apimodels.APIContext) *verrors.APIError

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL