response

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR = iota - 1
	SUCCESS
)

Variables

This section is empty.

Functions

func NgWithData

func NgWithData(data interface{}, message string, c *gin.Context)

func NgWithMsg

func NgWithMsg(message string, c *gin.Context)

func OkWithData

func OkWithData(data interface{}, message string, c *gin.Context)

func OkWithMsg

func OkWithMsg(message string, c *gin.Context)

func Result

func Result(code int, data interface{}, msg string, c *gin.Context)

Types

type CaptchaResponse

type CaptchaResponse struct {
	CapId  string `json:"captchaId"`
	PicStr string `json:"picStr"`
	CapLen int    `json:"captchaLength"`
	IsOpen bool   `json:"isOpen"`
}

type LoginResp

type LoginResp struct {
	User      model.SrvUser `json:"user"`
	Token     string        `json:"token"`
	ExpiresAt int64         `json:"expiresAt"`
}

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type UserResp

type UserResp struct {
	User model.SrvUser `json:"user"`
}

Jump to

Keyboard shortcuts

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