http

package
v0.0.0-...-e75800c Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CorrelationIdHeader = "X-Correlation-ID"
)

Variables

View Source
var (
	RequestId     string
	CorrelationId string
)

Functions

func BodySizeLimitMiddleware

func BodySizeLimitMiddleware(requestBytesLimit int64) gin.HandlerFunc

func LoggingMiddleware

func LoggingMiddleware() gin.HandlerFunc

func RequestJsonLogger

func RequestJsonLogger() gin.HandlerFunc

func RunHttpServer

func RunHttpServer(addr string, init func(engine *gin.Engine))

Types

type ErrorResponse

type ErrorResponse struct {
	Status  int
	Message string `json:"message"`
}

func (*ErrorResponse) Error

func (error *ErrorResponse) Error() string

Jump to

Keyboard shortcuts

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