context

package
v0.0.0-...-1225d9a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 4 Imported by: 0

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

func NewReqContext() *ReqContext

NewReqContext 创建请假上下文实例

Jump to

Keyboard shortcuts

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