context

package module
v0.0.0-...-e913afb Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 3 Imported by: 2

README

context

A FAIRE.

Licence

MIT.


Copyright (c) 2021 losyme.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Request  *http.Request
	Response http.ResponseWriter
	Status   int
	// contains filtered or unexported fields
}

func (*Context) AddData

func (c *Context) AddData(key string, value interface{})

func (*Context) AddParam

func (c *Context) AddParam(name, value string)

func (*Context) Data

func (c *Context) Data(key string) (interface{}, bool)

func (*Context) Error

func (c *Context) Error() error

func (*Context) JSON

func (c *Context) JSON(status int, data interface{}) error

func (*Context) Param

func (c *Context) Param(name string) string

func (*Context) RecoverData

func (c *Context) RecoverData() interface{}

func (*Context) Render

func (c *Context) Render(status int, rr render.Render) error

func (*Context) RequestID

func (c *Context) RequestID() string

func (*Context) SetError

func (c *Context) SetError(err error)

func (*Context) SetRecoverData

func (c *Context) SetRecoverData(data interface{})

func (*Context) SetRequestID

func (c *Context) SetRequestID(rid string)

type Pool

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

func NewPool

func NewPool() *Pool

func (*Pool) Get

func (p *Pool) Get(rw http.ResponseWriter, req *http.Request) *Context

func (*Pool) Put

func (p *Pool) Put(c *Context)

Jump to

Keyboard shortcuts

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