gin

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtxToken = "token"
)

Variables

This section is empty.

Functions

func APILogging

func APILogging(logger logger.Logger) gin.HandlerFunc

func APIRequestToken

func APIRequestToken(ignore ...interface{}) gin.HandlerFunc

func ErrorFormatter

func ErrorFormatter() gin.HandlerFunc

func Lifecycle

func Lifecycle(lifecycle fx.Lifecycle, server *Server)

func PanicRecovery

func PanicRecovery(logger logger.Logger) gin.HandlerFunc

Types

type Server

type Server struct {
	GinEngine  *gin.Engine
	HTTPServer *http.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config *server.Config, logger logger.Logger) *Server

func (*Server) Start

func (s *Server) Start(_ context.Context) error

func (*Server) Stop

func (s *Server) Stop(_ context.Context) error

func (*Server) WithDefaultMiddlewares

func (s *Server) WithDefaultMiddlewares() *Server

Jump to

Keyboard shortcuts

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