api

package
v0.0.0-...-eb626f9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserIDKey        = prefix + "/user-id"
	ReqBodyKey       = prefix + "/req-body"
	ResBodyKey       = prefix + "/res-body"
	LoggerReqBodyKey = prefix + "/logger-req-body"
)

Variables

This section is empty.

Functions

func GetBody

func GetBody(c *gin.Context) []byte

func GetToken

func GetToken(c *gin.Context) string

func GetUserID

func GetUserID(c *gin.Context) string

func ParseForm

func ParseForm(c *gin.Context, obj interface{}) error

func ParseJSON

func ParseJSON(c *gin.Context, obj interface{}) error

func ParseQuery

func ParseQuery(c *gin.Context, obj interface{}) error

func ResError

func ResError(c *gin.Context, err error, status ...int)

func ResJSON

func ResJSON(c *gin.Context, status int, v interface{})

func ResList

func ResList(c *gin.Context, v interface{})

func ResOK

func ResOK(c *gin.Context)

func ResPage

func ResPage(c *gin.Context, v interface{}, pr *pagination.Pagination)

func ResSuccess

func ResSuccess(c *gin.Context, v interface{})

func SetUserID

func SetUserID(c *gin.Context, userID string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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