_context

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	TimeS int64

	STORE   map[string]interface{}
	GET     map[string]string
	POST    map[string]string
	REQUEST map[string]string
	COOKIE  map[string]*http.Cookie
	SERVER  map[string]string
	ENV     map[string]string
	BODY    []byte
	FILE    map[string][]*multipart.FileHeader
	// contains filtered or unexported fields
}

func New

func New(w http.ResponseWriter, r *http.Request, debug bool) *Context

func (*Context) Body

func (this *Context) Body() []byte

func (*Context) Cookie

func (this *Context) Cookie(k string) *http.Cookie

func (*Context) CookieParameter

func (this *Context) CookieParameter(k string) *_parameter.Parameter

func (*Context) CookieValue

func (this *Context) CookieValue(k string, v string) string

func (*Context) CookieValueAll

func (this *Context) CookieValueAll() map[string]string

func (*Context) File

func (this *Context) File(k string) []*multipart.FileHeader

func (*Context) GetParameter

func (this *Context) GetParameter(k string) *_parameter.Parameter

func (*Context) GetValue

func (this *Context) GetValue(k string, v string) string

func (*Context) GetValueAll

func (this *Context) GetValueAll() map[string]string

func (*Context) JSON

func (this *Context) JSON(data any)

func (*Context) PostParameter

func (this *Context) PostParameter(k string) *_parameter.Parameter

func (*Context) PostValue

func (this *Context) PostValue(k string, v string) string

func (*Context) PostValueAll

func (this *Context) PostValueAll() map[string]string

func (*Context) REDIRECT

func (this *Context) REDIRECT(uri string)

func (*Context) RequestParameter

func (this *Context) RequestParameter(k string) *_parameter.Parameter

func (*Context) RequestValue

func (this *Context) RequestValue(k string, v string) string

func (*Context) RequestValueAll

func (this *Context) RequestValueAll() map[string]string

func (*Context) ServerParameter

func (this *Context) ServerParameter(k string) *_parameter.Parameter

func (*Context) ServerValue

func (this *Context) ServerValue(k string, v string) string

func (*Context) ServerValueAll

func (this *Context) ServerValueAll() map[string]string

func (*Context) SetCookie

func (this *Context) SetCookie(cookie *http.Cookie) *Context

func (*Context) SetHeader

func (this *Context) SetHeader(k string, v string) *Context

Jump to

Keyboard shortcuts

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