common

package
v0.0.0-...-dd5d962 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR   = 500
	SUCCESS = 200
)

Variables

This section is empty.

Functions

func Fail

func Fail(c *gin.Context, msg string, data interface{})

func Ok

func Ok(c *gin.Context, msg string, data interface{})

func Result

func Result(c *gin.Context, code int, msg string, data interface{})

Types

type JWTClaims

type JWTClaims struct {
	jwt.StandardClaims
	UUID       uuid.UUID
	Mobile     string
	UserName   string
	BufferTime int64
}

type Response

type Response struct {
	Code    int         `json:"code,omitempty"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

Jump to

Keyboard shortcuts

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