_context

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 12 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{} // 自定义存储
	// contains filtered or unexported fields
}

func New

func New(render *_render.Render, timeS int64, w http.ResponseWriter, r *http.Request, routerParameter map[string]string, debug bool) *Context

func (*Context) Bind

func (c *Context) Bind(v interface{})

func (*Context) BindBody added in v1.2.0

func (c *Context) BindBody(v interface{})

func (*Context) BindGet added in v1.2.0

func (c *Context) BindGet(v interface{})

func (*Context) BindPost added in v1.2.0

func (c *Context) BindPost(v interface{})

func (*Context) BindRequest added in v1.2.0

func (c *Context) BindRequest(v interface{})

func (*Context) Body

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

func (*Context) Cookie

func (c *Context) Cookie(key string) *_parameter.Parameter

func (*Context) CookieAll added in v1.2.0

func (c *Context) CookieAll() map[string]string

func (*Context) File

func (c *Context) File(key string) *_parameter.Parameter

func (*Context) FileAll added in v1.2.0

func (c *Context) FileAll() map[string][]*multipart.FileHeader

func (*Context) Get added in v1.2.0

func (c *Context) Get(key string) *_parameter.Parameter

func (*Context) GetAll added in v1.2.0

func (c *Context) GetAll() map[string]interface{}

func (*Context) Header added in v1.2.0

func (c *Context) Header(key string) *_parameter.Parameter

func (*Context) HeaderAll added in v1.2.0

func (c *Context) HeaderAll() map[string]string

func (*Context) JSON

func (c *Context) JSON(data any)

func (*Context) Post added in v1.2.0

func (c *Context) Post(key string) *_parameter.Parameter

func (*Context) PostAll added in v1.2.0

func (c *Context) PostAll() map[string]interface{}

func (*Context) REDIRECT

func (c *Context) REDIRECT(uri string)

func (*Context) Request added in v1.2.0

func (c *Context) Request(key string) *_parameter.Parameter

func (*Context) RequestAll added in v1.2.0

func (c *Context) RequestAll() map[string]interface{}

func (*Context) Server added in v1.2.0

func (c *Context) Server(key string) *_parameter.Parameter

func (*Context) ServerAll added in v1.2.0

func (c *Context) ServerAll() map[string]string

func (*Context) SetCookie

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

func (*Context) SetHeader

func (c *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