gee

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

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

Go to latest
Published: Nov 21, 2022 License: GPL-3.0 Imports: 5 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
}

func (*Context) Data

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

func (*Context) HTML

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

func (*Context) JSON

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

func (*Context) Query

func (c *Context) Query(key string) 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 Engine

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

func New

func New() *Engine

func (*Engine) Get

func (engine *Engine) Get(pattern string, handler HandlerFunc)

func (*Engine) POST

func (engine *Engine) POST(pattern string, handler HandlerFunc)

func (*Engine) Run

func (engine *Engine) Run(address string)

func (*Engine) ServeHTTP

func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request)

type H

type H map[string]interface{}

type HandlerFunc

type HandlerFunc func(*Context)

Jump to

Keyboard shortcuts

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