ctxUtil

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReqId  = "ReqId"
	UserId = "UserId"
	AppKey = "AppKey"
)

Variables

This section is empty.

Functions

func GetAppKey

func GetAppKey(c *gin.Context) string

func GetReqId

func GetReqId(c *gin.Context) string

func GetUserId

func GetUserId(c *gin.Context) string

GetUserId 获取用户的uuid

func SetAppKey

func SetAppKey(c *gin.Context, appKey string)

Types

type Context

type Context struct {
	context.Context
	// contains filtered or unexported fields
}

func WithCtx

func WithCtx(c *gin.Context) *Context

func (*Context) GetCtx

func (x *Context) GetCtx() *context.Context

func (*Context) GetGinCtx

func (x *Context) GetGinCtx() *gin.Context

func (*Context) GetReqId

func (x *Context) GetReqId() string

func (*Context) GetUserId

func (x *Context) GetUserId() string

Jump to

Keyboard shortcuts

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