restapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Server *gin.Engine
)

Functions

func AddChecker

func AddChecker(name string, f func(ctx context.Context) error)

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

CORSMiddleware adds CORS headers to the response. It is a middleware function for Gin framework.

func HelmetMiddleware

func HelmetMiddleware() gin.HandlerFunc

HelmetMiddleware adds security headers to the response.

func LoggerMiddleware

func LoggerMiddleware() gin.HandlerFunc

LoggerMiddleware logs the request and response details. It is a middleware function for Gin framework.

func RequestIDMiddleware

func RequestIDMiddleware() gin.HandlerFunc

RequestIDMiddleware generates a unique request ID and sets it in the response header. It is a middleware function for Gin framework.

func Run

func Run()

Types

This section is empty.

Jump to

Keyboard shortcuts

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