controller

package
v0.0.0-...-c6cfeb0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success       = 0
	ErrSystem int = iota + 100
	ErrMissParams
	ErrMissPerms
	ErrNotFound
	ErrNoLogin
	ErrInvalidToken
	ErrAuth
)

Variables

This section is empty.

Functions

func GetGlobalMsg

func GetGlobalMsg(code int) (int, string)

Types

type JsonResponse

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

func CreateJsonResponse

func CreateJsonResponse(code int, msg string, data interface{}) *JsonResponse

func FailBean

func FailBean(code int, msg string) *JsonResponse

func SuccessBean

func SuccessBean(data interface{}) *JsonResponse

Jump to

Keyboard shortcuts

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