utils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiResponse

func ApiResponse(context *gin.Context, errorCode fmt.Stringer, data ...any)

ApiResponse 异常通知

func WebResponse

func WebResponse(context *gin.Context, errorCode any, data ...any)

WebResponse 异常通知

Types

type ResponseData

type ResponseData struct {
	Code fmt.Stringer `json:"code"`
	Msg  string       `json:"msg"`
	Data any          `json:"data"`
}

ResponseData 响应结构体

Jump to

Keyboard shortcuts

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