httpx

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 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 InitializeHttpServer

func InitializeHttpServer(ctx contextx.Context, registry func(engine *gin.Engine), opfs ...func(s *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