response

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAbortResponse

func HandleAbortResponse(c *gin.Context, err string)

HandleAbortResponse 统一 Abort 返回处理

func HandleResponse

func HandleResponse(c *gin.Context, data any, err error)

HandleResponse 统一返回处理

Types

type UnifiedResponse

type UnifiedResponse struct {
	Code    int    `json:"code"`
	Data    any    `json:"data"`
	Message string `json:"message"`
}

UnifiedResponse 统一返回

Jump to

Keyboard shortcuts

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