response

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(ctx *gin.Context, err error, data ...interface{})

Error 返回错误信息到前端

func Success

func Success(ctx *gin.Context, data interface{})

Types

type InterceptorFunc

type InterceptorFunc func(ctx *gin.Context, p *Response)

type ListData

type ListData struct {
	List  interface{} `json:"list"`
	Count int64       `json:"count"`
}

type Response

type Response struct {
	Data    interface{} `json:"data"`
	Result  string      `json:"result"`
	TraceId string      `json:"trace_id"`
	*ecode.ErrorX
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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