context

package
v0.0.0-...-2168519 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleWare

func NewMiddleWare() *middleWare

Types

type Context

type Context struct {
	Writer  http.ResponseWriter
	Request *http.Request

	Method string
	Path   string

	Params map[string]string

	// middlewares
	MiddleWares []StupidHandler
	// contains filtered or unexported fields
}

func NewContext

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

func (*Context) Next

func (c *Context) Next()

func (*Context) ParamByKey

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

func (*Context) QueryByKey

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

func (*Context) SetHeader

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

func (*Context) SetStatusCode

func (c *Context) SetStatusCode(code int)

func (*Context) String

func (c *Context) String(code int, format string, values ...interface{})

type Params

type Params map[string]string

type StupidHandler

type StupidHandler func(ctx *Context)

Jump to

Keyboard shortcuts

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