httpx

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindJsonArgs

func BindJsonArgs(c *gin.Context) (map[string]interface{}, bool)

func BindQueryArgs

func BindQueryArgs(c *gin.Context) (map[string]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.0.4

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

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