response

package
v0.0.0-...-9f28539 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR      = 7
	SUCCESS    = 0
	PARAMERROR = 101
)

Variables

This section is empty.

Functions

func CheckHandle

func CheckHandle(c *gin.Context, err error)

func Fail

func Fail(c *gin.Context)

func FailWithDetailed

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

func FailWithDetailedAndError

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

func FailWithMessage

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

func FailWithMessageAndError

func FailWithMessageAndError(err int, message string, c *gin.Context)

func FileByBytes

func FileByBytes(c *gin.Context, filename string, data []byte)

func FileByReader

func FileByReader(c *gin.Context, filename string, reader io.Reader) error

func Ok

func Ok(c *gin.Context)

func OkWithData

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

func OkWithDetailed

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

func OkWithMessage

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

func Result

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

Types

type FrontResult

type FrontResult struct {
	List  interface{} `json:"list"`
	Total int64       `json:"total"`
}

type PageResult

type PageResult struct {
	List     interface{} `json:"list"`
	Total    int64       `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"pageSize"`
}

type PageResult1

type PageResult1 struct {
	List     interface{} `json:"list"`
	PlanList interface{} `json:"planList"`
	Total    int64       `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"pageSize"`
}

type PageResultAndTerm

type PageResultAndTerm struct {
	TermNow basicdata.Term `json:"termNow"`
	List    interface{}    `json:"list"`
	Total   int64          `json:"total"`
}

type Response

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

Jump to

Keyboard shortcuts

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