web

package
v0.0.0-...-563018e Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtreugoEngine

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

AtreugoEngine The atreugo implementation of engine

func NewAtreugoEngine

func NewAtreugoEngine(config map[string]interface{}) *AtreugoEngine

NewAtreugoEngine alloc new mem for atreugo impl engine from map config and give out the pointer

func (*AtreugoEngine) CONNECT

func (atreugoEngine *AtreugoEngine) CONNECT(path string, process Process)

CONNECT in AtreugoEngine

func (*AtreugoEngine) DELETE

func (atreugoEngine *AtreugoEngine) DELETE(path string, process Process)

DELETE in AtreugoEngine

func (*AtreugoEngine) GET

func (atreugoEngine *AtreugoEngine) GET(path string, process Process)

GET in AtreugoEngine

func (*AtreugoEngine) Group

func (atreugoEngine *AtreugoEngine) Group(path string, processArray ...Process) RouterGroup

Group in AtreugoEngine

func (*AtreugoEngine) HEAD

func (atreugoEngine *AtreugoEngine) HEAD(path string, process Process)

HEAD in AtreugoEngine

func (*AtreugoEngine) OPTIONS

func (atreugoEngine *AtreugoEngine) OPTIONS(path string, process Process)

OPTIONS in AtreugoEngine

func (*AtreugoEngine) PATCH

func (atreugoEngine *AtreugoEngine) PATCH(path string, process Process)

PATCH in AtreugoEngine

func (*AtreugoEngine) POST

func (atreugoEngine *AtreugoEngine) POST(path string, process Process)

POST in AtreugoEngine

func (*AtreugoEngine) PUT

func (atreugoEngine *AtreugoEngine) PUT(path string, process Process)

PUT in AtreugoEngine

func (*AtreugoEngine) SetLogger

func (atreugoEngine *AtreugoEngine) SetLogger(logger *log.Logger)

SetLogger in AtreugoEngine

func (*AtreugoEngine) TRACE

func (atreugoEngine *AtreugoEngine) TRACE(path string, process Process)

TRACE in AtreugoEngine

func (*AtreugoEngine) Use

func (atreugoEngine *AtreugoEngine) Use(processArray ...Process)

Use in AtreugoEngine

type Context

type Context interface {
	Request() Request

	Response() Response

	TEXT()

	HTML()

	JSON()

	JSONP()

	XML()
}

Context type of router

func ToContext

func ToContext(ctx *atreugo.RequestCtx) Context

ToContext Convert atreugo RequestCtx to Context

type EchoEngine

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

EchoEngine The echo implementation of engine

func NewEchoEngine

func NewEchoEngine() *EchoEngine

NewEchoEngine The Echo implementation of engine

func (*EchoEngine) Group

func (echo *EchoEngine) Group(relativePath string, processArray ...Process) RouterGroup

Group in EchoEngine

func (*EchoEngine) Use

func (echo *EchoEngine) Use(process Process)

Use in EchoEngine

type Engine

type Engine interface {
	RouterGroup

	SetLogger(logger *log.Logger)

	Use(processArray ...Process)

	Group(path string, process ...Process) RouterGroup
}

Engine type of router

type GinEngine

type GinEngine struct {
}

type Process

type Process func(c Context) error

Process type of function , expressing the middleware mainly to do

type Request

type Request interface {
}

Request a collection of request

type Response

type Response interface {
}

Response a collection of Response

type RouterGroup

type RouterGroup interface {
	GET(path string, process Process)

	POST(path string, process Process)

	PUT(path string, process Process)

	DELETE(path string, process Process)

	PATCH(path string, process Process)

	HEAD(path string, process Process)

	OPTIONS(path string, process Process)

	TRACE(path string, process Process)

	CONNECT(path string, process Process)
}

RouterGroup type of router

Jump to

Keyboard shortcuts

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