gin

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert added in v1.3.0

func Convert(handler http.HandlerFunc) gin.HandlerFunc

func Converts added in v1.3.0

func Converts(handlers []http.HandlerFunc) []gin.HandlerFunc

func Debug

func Debug(r *gin.Engine)

func FromStdWithNext added in v1.3.0

func FromStdWithNext(h func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)) gin.HandlerFunc

func OpenApi

func OpenApi(mux *gin.Engine, filePath string)

func RespErr added in v1.3.0

func RespErr(ctx *gin.Context, err error)

func RespErrMsg added in v1.3.0

func RespErrMsg(ctx *gin.Context, msg string)

func RespErrRep added in v1.3.0

func RespErrRep(ctx *gin.Context, rep *errorcode.ErrRep)

func RespErrcode added in v1.3.0

func RespErrcode(ctx *gin.Context, code errorcode.ErrCode)

func Response added in v1.3.0

func Response(ctx *gin.Context, code errorcode.ErrCode, msg string, data interface{})

func Wrap added in v1.3.0

func Wrap(handler interface{}) gin.HandlerFunc

Wrap converts native http.Handler & http.HandlerFunc to gin.HandlerFunc.

Supported form types:

.Wrap(h http.Handler)
.Wrap(func(w http.ResponseWriter, r *http.Request))
.Wrap(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc))

Types

type Config

type Config gin.Engine

func (*Config) New

func (c *Config) New() *gin.Engine

type ExportService added in v1.3.0

type ExportService struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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