context

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserContext

type UserContext struct {
	ContextType           reflect.Type
	IsHeaders             bool
	RouteParams           map[int]int
	FormParams            map[string]int
	MultiFormParams       map[string]int
	MultiFormParamsIsFile map[string]bool
	QueryParams           map[string]int
	// `cookie:"token"`, would store "token" as key, field index as value
	CookiesParams map[string]int
	// `header:"Content-Type"`, would store "Content-Type" as key, field index as value
	HeaderParams map[string]int
	// `http:"request"` would take request
	// http tag is limited, can only take what we allow at here:
	//
	// - request
	HttpParams              map[string]int
	ExpectJSONRequest       bool
	ExpectMultiFormsRequest bool
}

func NewUserContext

func NewUserContext() *UserContext

func (*UserContext) CacheParamsOffset

func (ctx *UserContext) CacheParamsOffset(contextT reflect.Type, routes []string) *UserContext

func (*UserContext) ExpectCookies

func (ctx *UserContext) ExpectCookies() bool

func (*UserContext) ExpectHTTP added in v0.14.0

func (ctx *UserContext) ExpectHTTP() bool

func (*UserContext) ExpectHeader

func (ctx *UserContext) ExpectHeader() bool

Jump to

Keyboard shortcuts

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