server

package
v0.0.0-...-9ce3a7f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinLogger

func GinLogger(logger *zap.Logger) gin.HandlerFunc

func HttpServerRun

func HttpServerRun()

func IPAuthMiddleware

func IPAuthMiddleware() gin.HandlerFunc

IP 白名单拦截

func InitRouter

func InitRouter() *gin.Engine

func RecoveryMiddleware

func RecoveryMiddleware() gin.HandlerFunc

捕获所有panic,并且返回错误信息

func RequestId

func RequestId() gin.HandlerFunc

请求 id

func ServerStop

func ServerStop()

Types

type Option

type Option func(server *Server)

type Server

type Server struct {
	Port string
}

Jump to

Keyboard shortcuts

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