context

package
v0.0.0-...-af3a3eb Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 8 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 {
	Res      http.ResponseWriter
	Req      *http.Request
	Params   Params
	End      func()
	Next     func()
	Var      map[string]any
	NotFound func()
}

func (*Context) AddHeader

func (c *Context) AddHeader(key, value string) *Context

func (*Context) Body

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

func (*Context) Cancel

func (c *Context) Cancel() <-chan struct{}

func (*Context) Close

func (c *Context) Close() bool

func (*Context) ContentLength

func (c *Context) ContentLength() int64

func (*Context) Form

func (c *Context) Form() url.Values

func (*Context) GetBody

func (c *Context) GetBody() func() (io.ReadCloser, error)

func (*Context) GetParam

func (c *Context) GetParam(key string) string

func (*Context) Host

func (c *Context) Host() string

func (*Context) Html

func (c *Context) Html(value string) *Context

func (*Context) Json

func (c *Context) Json(value any) *Context

func (*Context) Method

func (c *Context) Method() string

func (*Context) MultipartForm

func (c *Context) MultipartForm() *multipart.Form

func (*Context) ParseBody

func (c *Context) ParseBody() ([]byte, error)

func (*Context) ParseJson

func (c *Context) ParseJson(target any) error

func (*Context) ParseText

func (c *Context) ParseText() (string, error)

func (*Context) PostForm

func (c *Context) PostForm() url.Values

func (*Context) Proto

func (c *Context) Proto() string

func (*Context) ProtoMajor

func (c *Context) ProtoMajor() int

func (*Context) ProtoMinor

func (c *Context) ProtoMinor() int

func (*Context) Query

func (c *Context) Query() url.Values

func (*Context) ReadBody

func (c *Context) ReadBody() io.ReadCloser

func (*Context) RemoteAddr

func (c *Context) RemoteAddr() string

func (*Context) ReqURI

func (c *Context) ReqURI() string

func (*Context) Response

func (c *Context) Response() *http.Response

func (*Context) SetHeader

func (c *Context) SetHeader(key, value string) *Context

func (*Context) Status

func (c *Context) Status(status int) *Context

func (*Context) TLS

func (c *Context) TLS() *tls.ConnectionState

func (*Context) Text

func (c *Context) Text(value string) *Context

func (*Context) TransferEncoding

func (c *Context) TransferEncoding() []string

func (*Context) URL

func (c *Context) URL() *url.URL

type Params

type Params map[string]string

Jump to

Keyboard shortcuts

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