help

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAccessTokenKey = "UserAccessToken"
)

Variables

This section is empty.

Functions

func GetUserToken

func GetUserToken(ctx context.Context) *idl.Token

func SetContext

func SetContext(ctx *gin.Context, key string, val interface{}) *gin.Context

func SetUserToken

func SetUserToken(ctx *gin.Context, token *idl.Token) *gin.Context

Types

type JsonResponse

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

func FailureJson

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

func SuccessJson

func SuccessJson(data interface{}) *JsonResponse

Jump to

Keyboard shortcuts

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