context

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 4 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContext

func WithContext(req *http.Request, rctx *ReqContext) *http.Request

WithContext 携带请求上下文

Types

type ReqContext

type ReqContext struct {
	Entry    *httppb.Entry
	PS       httprouter.Params
	AuthInfo interface{}
}

ReqContext context

func GetContext

func GetContext(req *http.Request) *ReqContext

GetContext 获取请求上下文中的数据

func NewReqContext added in v0.3.0

func NewReqContext() *ReqContext

NewReqContext 创建请假上下文实例

Jump to

Keyboard shortcuts

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