ctxsrv

package
v0.0.0-...-f99bec7 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CtxSrvKey = "CtxSrvKey"

CtxSrvKey 上下文变量存储键名

Variables

This section is empty.

Functions

func GetVar

func GetVar(ctx context.Context) *gvar.Var

GetVar 获取上下文变量

func Init

func Init(r *ghttp.Request, val *Ctx)

Init 初始化上下文对象指针到上下文对象中,以便后续的请求流程中可以修改

func SetVar

func SetVar(ctx context.Context, val interface{})

SetVar 设置上下文变量(完全覆盖历史信息)

Types

type Ctx

type Ctx struct {
	Value interface{}
}

Ctx .

Jump to

Keyboard shortcuts

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