commons

package
v0.0.0-...-2a34ce9 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONError

func JSONError(code int, msg string) gin.H

Types

type Response

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

func Error

func Error(code int, msg string, data any) *Response

func Success

func Success(data any) *Response

func SuccessMsg

func SuccessMsg(msg string) *Response

type SuccessResponse

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

Jump to

Keyboard shortcuts

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