fasthttp

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FastHTTPServer

type FastHTTPServer struct {
	Server           *fasthttp.Server
	ServerInit       *revel.EngineInit
	MaxMultipartSize int64
}

func (*FastHTTPServer) Engine

func (f *FastHTTPServer) Engine() interface{}

func (*FastHTTPServer) Event

func (f *FastHTTPServer) Event(event revel.Event, args interface{})

func (*FastHTTPServer) Init

func (f *FastHTTPServer) Init(init *revel.EngineInit)

func (*FastHTTPServer) Name

func (f *FastHTTPServer) Name() string

func (*FastHTTPServer) RequestHandler

func (f *FastHTTPServer) RequestHandler(ctx *fasthttp.RequestCtx)

func (*FastHTTPServer) Start

func (f *FastHTTPServer) Start()

Handler is assigned in the Init

func (*FastHTTPServer) Stats

func (g *FastHTTPServer) Stats() map[string]interface{}

type FastHttpContext

type FastHttpContext struct {
	Request  *FastHttpRequest
	Response *FastHttpResponse
}

func NewFastHttpContext

func NewFastHttpContext(instance *FastHTTPServer) *FastHttpContext

func (*FastHttpContext) Destroy

func (c *FastHttpContext) Destroy()

func (*FastHttpContext) GetRequest

func (c *FastHttpContext) GetRequest() revel.ServerRequest

func (*FastHttpContext) GetResponse

func (c *FastHttpContext) GetResponse() revel.ServerResponse

func (*FastHttpContext) SetContext

func (c *FastHttpContext) SetContext(context *fasthttp.RequestCtx)

type FastHttpCookie

type FastHttpCookie []byte

func (FastHttpCookie) GetValue

func (r FastHttpCookie) GetValue() string

type FastHttpHeader

type FastHttpHeader struct {
	Source interface{}
	// contains filtered or unexported fields
}

func (*FastHttpHeader) Add

func (r *FastHttpHeader) Add(key string, value string)

func (*FastHttpHeader) Del

func (r *FastHttpHeader) Del(key string)

func (*FastHttpHeader) Get

func (r *FastHttpHeader) Get(key string) (value []string)

func (*FastHttpHeader) GetCookie

func (r *FastHttpHeader) GetCookie(key string) (value revel.ServerCookie, err error)

func (*FastHttpHeader) Set

func (r *FastHttpHeader) Set(key string, value string)

func (*FastHttpHeader) SetCookie

func (r *FastHttpHeader) SetCookie(cookie string)

func (*FastHttpHeader) SetStatus

func (r *FastHttpHeader) SetStatus(statusCode int)

type FastHttpMultipartForm

type FastHttpMultipartForm struct {
	Form *multipart.Form
}

func (*FastHttpMultipartForm) GetFiles

func (f *FastHttpMultipartForm) GetFiles() map[string][]*multipart.FileHeader

func (*FastHttpMultipartForm) GetValues

func (f *FastHttpMultipartForm) GetValues() url.Values

func (*FastHttpMultipartForm) RemoveAll

func (f *FastHttpMultipartForm) RemoveAll() error

type FastHttpRequest

type FastHttpRequest struct {
	Original   *fasthttp.RequestCtx
	FormParsed bool

	MultiFormParsed bool
	// WebSocket       *websocket.Conn
	ParsedForm *FastHttpMultipartForm

	Engine *FastHTTPServer
	// contains filtered or unexported fields
}

func (*FastHttpRequest) Destroy

func (r *FastHttpRequest) Destroy()

func (*FastHttpRequest) Get

func (r *FastHttpRequest) Get(key int) (value interface{}, err error)

func (*FastHttpRequest) GetForm

func (r *FastHttpRequest) GetForm() (url.Values, error)

func (*FastHttpRequest) GetHeader

func (r *FastHttpRequest) GetHeader() revel.ServerHeader

func (*FastHttpRequest) GetMultipartForm

func (r *FastHttpRequest) GetMultipartForm() (revel.ServerMultipartForm, error)

func (*FastHttpRequest) GetQuery

func (r *FastHttpRequest) GetQuery() url.Values

func (*FastHttpRequest) GetRaw

func (r *FastHttpRequest) GetRaw() interface{}

func (*FastHttpRequest) Set

func (r *FastHttpRequest) Set(key int, value interface{}) bool

func (*FastHttpRequest) SetContext

func (r *FastHttpRequest) SetContext(req *fasthttp.RequestCtx)

type FastHttpResponse

type FastHttpResponse struct {
	Original *fasthttp.RequestCtx

	Writer io.Writer
	Engine *FastHTTPServer
	// contains filtered or unexported fields
}

func (*FastHttpResponse) Destroy

func (r *FastHttpResponse) Destroy()

func (*FastHttpResponse) Get

func (r *FastHttpResponse) Get(key int) (value interface{}, err error)

func (*FastHttpResponse) GetRaw

func (r *FastHttpResponse) GetRaw() interface{}

func (*FastHttpResponse) GetWriter

func (r *FastHttpResponse) GetWriter() io.Writer

func (*FastHttpResponse) Header

func (r *FastHttpResponse) Header() revel.ServerHeader

func (*FastHttpResponse) Set

func (r *FastHttpResponse) Set(key int, value interface{}) (set bool)

func (*FastHttpResponse) SetContext

func (r *FastHttpResponse) SetContext(w *fasthttp.RequestCtx)

func (*FastHttpResponse) SetWriter

func (r *FastHttpResponse) SetWriter(writer io.Writer)

func (*FastHttpResponse) WriteStream

func (r *FastHttpResponse) WriteStream(name string, contentlen int64, modtime time.Time, reader io.Reader) error

Jump to

Keyboard shortcuts

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