gin

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package gin wraps the gin-gonic web framework and lists the middlewares which are expected to be enabled/disabled by the configuration settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine = gin.Engine

Engine represents the main object type containing all gin framework details such a middlewares and configurations.

func New

func New(middlewares ...HandlerFunc) *Engine

New creates a new gin Engine instance, registering the given middleware functions (if any).

type HandlerFunc

type HandlerFunc = gin.HandlerFunc

HandlerFunc defines a gin middleware function. Each middleware will be called in order of its registration, may process the given gin.Context argument, pass control to the subsequent handlers by calling the ctx.Next() method, and then run some finalizing codes (if any).

func Logger

func Logger() HandlerFunc

Logger middleware logs incoming requests and their responses which is useful for debugging.

func Recovery

func Recovery() HandlerFunc

Recovery middleware recovers panics and responds with 500 to clients.

Directories

Path Synopsis
Package carsrs realizes the cars resource, allowing the cars manipulation REST APIs to be accepted and delegated to the cars use cases respectively.
Package carsrs realizes the cars resource, allowing the cars manipulation REST APIs to be accepted and delegated to the cars use cases respectively.
Package routes contains all resource packages and facilitates instantiation and registration of all repo, use case, and resource packages based on the user provided configuration settings.
Package routes contains all resource packages and facilitates instantiation and registration of all repo, use case, and resource packages based on the user provided configuration settings.
Package serdser contains the reusable serialization/deserialization logics in order to be used by the resource packages.
Package serdser contains the reusable serialization/deserialization logics in order to be used by the resource packages.

Jump to

Keyboard shortcuts

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