controller

package
v0.0.0-...-b480da5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDBSession

func GetDBSession(c *gin.Context) *xorm.Session

func GetRequestId

func GetRequestId(c *gin.Context) string

func GetUserId

func GetUserId(c *gin.Context) int64

func GetUsername

func GetUsername(c *gin.Context) string

func HttpHandlerGetAllByUser

func HttpHandlerGetAllByUser(c *gin.Context)

func HttpHandlerLogin

func HttpHandlerLogin(c *gin.Context)

func HttpHandlerPing

func HttpHandlerPing(c *gin.Context)

func HttpHandlerRegister

func HttpHandlerRegister(c *gin.Context)

Types

type Result

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

func Failure

func Failure(err *errors.Err) (int, *Result)

func Success

func Success(data ...interface{}) (int, *Result)

data为可选参数

Jump to

Keyboard shortcuts

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