gee

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine implement the interface of ServeHTTP

func Default

func Default() *Engine

Default use Logger() & Recovery middlewares

func New

func New() *Engine

New is the constructor of gee.Engine

func (*Engine) Run

func (engine *Engine) Run(addr string) (err error)

Run defines the method to start a http server

func (*Engine) ServeHTTP

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

type RouterGroup

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

func (*RouterGroup) Any added in v0.0.4

func (routerGroup *RouterGroup) Any(pattern string, handler gee_context.HandlerFunc)

Any defines the method to add ... request

func (*RouterGroup) CONNECT added in v0.0.4

func (routerGroup *RouterGroup) CONNECT(pattern string, handler gee_context.HandlerFunc)

CONNECT defines the method to add CONNECT request

func (*RouterGroup) DELETE

func (routerGroup *RouterGroup) DELETE(pattern string, handler gee_context.HandlerFunc)

DELETE defines the method to add DELETE request

func (*RouterGroup) GET

func (routerGroup *RouterGroup) GET(pattern string, handler gee_context.HandlerFunc)

GET defines the method to add GET request

func (*RouterGroup) Group

func (routerGroup *RouterGroup) Group(prefix string) *RouterGroup

Group is defined to create a new RouterGroup remember all groups share the same Engine instance

func (*RouterGroup) HEAD added in v0.0.4

func (routerGroup *RouterGroup) HEAD(pattern string, handler gee_context.HandlerFunc)

HEAD defines the method to add HEAD request

func (*RouterGroup) OPTION added in v0.0.4

func (routerGroup *RouterGroup) OPTION(pattern string, handler gee_context.HandlerFunc)

OPTION defines the method to add OPTION request

func (*RouterGroup) PATCH added in v0.0.4

func (routerGroup *RouterGroup) PATCH(pattern string, handler gee_context.HandlerFunc)

PATCH defines the method to add PATCH request

func (*RouterGroup) POST

func (routerGroup *RouterGroup) POST(pattern string, handler gee_context.HandlerFunc)

POST defines the method to add POST request

func (*RouterGroup) PUT

func (routerGroup *RouterGroup) PUT(pattern string, handler gee_context.HandlerFunc)

PUT defines the method to add PUT request

func (*RouterGroup) Static

func (routerGroup *RouterGroup) Static(relativePath string, root string)

Static serve static files

func (*RouterGroup) TRACE added in v0.0.4

func (routerGroup *RouterGroup) TRACE(pattern string, handler gee_context.HandlerFunc)

TRACE defines the method to add TRACE request

func (*RouterGroup) Use

func (routerGroup *RouterGroup) Use(middlewares ...gee_context.HandlerFunc)

Use is defined to add middleware to the group

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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