rgresponse

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SystemError

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

系统异常

Types

type Client

type Client struct {
	UniqId string
	Ctx    *gin.Context
}

func New

func New(uniqId string, ctx *gin.Context) *Client

func (*Client) Return

func (c *Client) Return(errCode int64, returnData ...interface{})

* @Content : 自定义返回 code, data, message * @Param : code, data, message * @Return : * @Author : LiJunDong * @Time : 2022-03-13

func (*Client) ReturnError

func (c *Client) ReturnError(errCode int64, returnData ...interface{})

* @Content : 错误返回 * @Param : code, data, message * @Return : * @Author : LiJunDong * @Time : 2022-03-13

func (*Client) ReturnSuccess

func (c *Client) ReturnSuccess(data interface{})

* @Content : 正确返回,固定返回code为200 * @Param : * @Return : * @Author : LiJunDong * @Time : 2022-03-13

func (*Client) View

func (c *Client) View(path string, data map[string]interface{})

Jump to

Keyboard shortcuts

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