context

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

func NewContext

func NewContext(w *responses.ResponseWriter, r *http.Request) *Middleware

func (*Middleware) ClientIP

func (c *Middleware) ClientIP() string

func (*Middleware) CrumbVal

func (c *Middleware) CrumbVal(name string) (*http.Cookie, bool)

func (*Middleware) Hostname

func (c *Middleware) Hostname() string

func (*Middleware) Location

func (c *Middleware) Location() *url.URL

func (*Middleware) MediaType

func (c *Middleware) MediaType(mt types.MediaType)

func (*Middleware) MetaVal

func (c *Middleware) MetaVal(key string) (string, bool)

func (*Middleware) Pathway

func (c *Middleware) Pathway() string

func (*Middleware) Protocol

func (c *Middleware) Protocol() string

func (*Middleware) QueryVal

func (c *Middleware) QueryVal(key string) (string, bool)

func (*Middleware) RedirectTo

func (c *Middleware) RedirectTo(code int, url string)

func (*Middleware) Referral

func (c *Middleware) Referral() string

func (*Middleware) Request

func (c *Middleware) Request() *http.Request

func (*Middleware) Respond

func (c *Middleware) Respond(status int, v interface{})

func (*Middleware) Response

func (c *Middleware) Response() http.ResponseWriter

func (*Middleware) SecureChannel

func (c *Middleware) SecureChannel() *tls.ConnectionState

func (*Middleware) SetBaggage

func (c *Middleware) SetBaggage(key string, value any)

func (*Middleware) SetCrumb

func (c *Middleware) SetCrumb(cookie *http.Cookie)

func (*Middleware) SetHeader

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

func (*Middleware) SetStatus

func (c *Middleware) SetStatus(status int)

func (*Middleware) Throw

func (c *Middleware) Throw(status int, err interface{})

func (*Middleware) UriParam

func (c *Middleware) UriParam(key string) (string, bool)

Jump to

Keyboard shortcuts

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