gfhttp

package
v0.0.0-...-2cadf5c Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NullData = struct{}{}

Functions

func BindJson

func BindJson(ctx *gin.Context, jsonReq interface{}) bool

Types

type Resp

type Resp struct {
	// contains filtered or unexported fields
}

func NewResp

func NewResp(ctx *gin.Context) *Resp

func (*Resp) Abort

func (r *Resp) Abort()

func (*Resp) Code

func (r *Resp) Code(code int) *Resp

func (*Resp) Data

func (r *Resp) Data(data any) *Resp

func (*Resp) Err

func (r *Resp) Err(err error)

func (*Resp) Extra

func (r *Resp) Extra(extra map[string]any) *Resp

func (*Resp) Msg

func (r *Resp) Msg(msg string) *Resp

func (*Resp) OK

func (r *Resp) OK(data any)

func (*Resp) Status

func (r *Resp) Status(status int) *Resp

Jump to

Keyboard shortcuts

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