gee_context

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 4 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 {
	// origin objects
	Writer http.ResponseWriter
	Req    *http.Request
	// request info
	Path   string
	Method string
	// response info
	StatusCode int
	Params     map[string]string
	// middleware
	Handlers []HandlerFunc
	// contains filtered or unexported fields
}

func NewContext

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

func (*Context) Abort

func (c *Context) Abort(handlerFunc HandlerFunc)

func (*Context) Data

func (c *Context) Data(code int, data []byte)

func (*Context) GetHeader added in v0.0.3

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

func (*Context) HTML

func (c *Context) HTML(code int, html string)

func (*Context) JSON

func (c *Context) JSON(code int, obj interface{})

func (*Context) Next

func (c *Context) Next()

func (*Context) Param

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

func (*Context) PostForm

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

func (*Context) Query

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

func (*Context) RemoteAddr added in v0.0.3

func (c *Context) RemoteAddr() string

func (*Context) SetHeader

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

func (*Context) Status

func (c *Context) Status(code int)

func (*Context) String

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

type H

type H map[string]interface{}

type HandlerFunc

type HandlerFunc func(ctx *Context)

HandlerFunc defines the request handler used by gee

Jump to

Keyboard shortcuts

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