common

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ParamsErrorMsg = "参数错误"
)

Functions

func PanicRecover

func PanicRecover()

func RespEmpty

func RespEmpty(c *gin.Context)

func RespError

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

func RespErrorCode

func RespErrorCode(c *gin.Context, code int, err error)

func RespErrorParams

func RespErrorParams(c *gin.Context)

func ShutdownSignals

func ShutdownSignals() []os.Signal

ShutdownSignals returns all the signals that are being watched for to shut down services.

Types

type ApiData

type ApiData struct {
	Code int
	Data any
	Msg  string
}

type EmptyData

type EmptyData struct {
	Code int
}

Jump to

Keyboard shortcuts

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