util

package
v0.0.0-...-c098066 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: LGPL-2.1 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResMsg = map[int]string{
	200:  "OK",
	201:  "Empty message",
	404:  "404",
	3000: "Check the legitimate",
	4000: "",
	4001: "Parsing JSON failed",
	4100: "The user name format is incorrect",
	4101: "The user password format is incorrect",
	4102: "The user email format is incorrect",

	5001: "Regrxp error",
	5002: "Database query failed",
	5003: "Database update failed",
	5004: "ParseInt failed",
}

Functions

func MD5Encipher

func MD5Encipher(code string) string

MD5 encryption for the code.

func Page

func Page(data []interface{})

func PraseData

func PraseData(c *gin.Context, object interface{})

Parse the JSON data in the request body.

func Response

func Response(c *gin.Context, httpCode int, code int, data interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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