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
Click to show internal directories.
Click to hide internal directories.