httpx

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindArgs added in v0.4.4

func BindArgs(c *gin.Context, arg interface{}) bool

func BindHeader added in v0.4.4

func BindHeader(c *gin.Context, arg interface{}) bool

func BindJsonArgs

func BindJsonArgs(c *gin.Context, arg interface{}) bool

func BindQueryArgs

func BindQueryArgs(c *gin.Context, arg interface{}) bool

func DecodeUrlVal

func DecodeUrlVal(c *gin.Context, key string) (string, bool)

func ErrInterrupt

func ErrInterrupt(c *gin.Context, err errcode.IErr)

func HasErr added in v0.4.2

func HasErr(c *gin.Context, errs ...error) bool

func InitializeHttpServer

func InitializeHttpServer(ctx contextx.Context, registry func(engine *gin.Engine), opfs ...func(opt *Option))

func PkgMsgWrite

func PkgMsgWrite(c *gin.Context, data interface{})

func RateMiddleware

func RateMiddleware(rateTime time.Duration) gin.HandlerFunc

Types

type Option added in v0.3.9

type Option struct {
	ListenIp     string // 监听IP
	Port         int    // 监听端口
	Mode         string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	CloseTimeout time.Duration
	RateTime     time.Duration
}

Jump to

Keyboard shortcuts

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