standard

package
v2.0.0-beta.2+incompat... Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapHandler

func WrapHandler(h http.Handler) echo.HandlerFunc

WrapHandler wraps `http.Handler` into `echo.HandlerFunc`.

func WrapMiddleware

func WrapMiddleware(m func(http.Handler) http.Handler) echo.MiddlewareFunc

WrapMiddleware wraps `func(http.Handler) http.Handler` into `echo.MiddlewareFunc`

Types

type Header struct {
	http.Header
}

Header implements `engine.Header`.

func (*Header) Add

func (h *Header) Add(key, val string)

Add implements `engine.Header#Add` function.

func (*Header) Del

func (h *Header) Del(key string)

Del implements `engine.Header#Del` function.

func (*Header) Get

func (h *Header) Get(key string) string

Get implements `engine.Header#Get` function.

func (*Header) Keys

func (h *Header) Keys() (keys []string)

Keys implements `engine.Header#Keys` function.

func (*Header) Set

func (h *Header) Set(key, val string)

Set implements `engine.Header#Set` function.

type Request

type Request struct {
	*http.Request
	// contains filtered or unexported fields
}

Request implements `engine.Request`.

func (*Request) Body

func (r *Request) Body() io.Reader

Body implements `engine.Request#Body` function.

func (*Request) FormFile

func (r *Request) FormFile(name string) (*multipart.FileHeader, error)

FormFile implements `engine.Request#FormFile` function.

func (*Request) FormValue

func (r *Request) FormValue(name string) string

FormValue implements `engine.Request#FormValue` function.

func (*Request) Header

func (r *Request) Header() engine.Header

Header implements `engine.Request#URL` function.

func (*Request) Host

func (r *Request) Host() string

Host implements `engine.Request#Host` function.

func (*Request) Method

func (r *Request) Method() string

Method implements `engine.Request#Method` function.

func (*Request) MultipartForm

func (r *Request) MultipartForm() (*multipart.Form, error)

MultipartForm implements `engine.Request#MultipartForm` function.

func (*Request) RemoteAddress

func (r *Request) RemoteAddress() string

RemoteAddress implements `engine.Request#RemoteAddress` function.

func (*Request) Scheme

func (r *Request) Scheme() string

Scheme implements `engine.Request#Scheme` function.

func (*Request) SetMethod

func (r *Request) SetMethod(method string)

SetMethod implements `engine.Request#SetMethod` function.

func (*Request) TLS

func (r *Request) TLS() bool

TLS implements `engine.Request#TLS` function.

func (*Request) URI

func (r *Request) URI() string

URI implements `engine.Request#URI` function.

func (*Request) URL

func (r *Request) URL() engine.URL

URL implements `engine.Request#URL` function.

func (*Request) UserAgent

func (r *Request) UserAgent() string

UserAgent implements `engine.Request#UserAgent` function.

type Response

type Response struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

Response implements `engine.Response`.

func (*Response) CloseNotify

func (r *Response) CloseNotify() <-chan bool

CloseNotify implements the http.CloseNotifier interface to allow detecting when the underlying connection has gone away. This mechanism can be used to cancel long operations on the server if the client has disconnected before the response is ready. See https://golang.org/pkg/net/http/#CloseNotifier

func (*Response) Committed

func (r *Response) Committed() bool

Committed implements `engine.Response#Committed` function.

func (*Response) Flush

func (r *Response) Flush()

Flush implements the http.Flusher interface to allow an HTTP handler to flush buffered data to the client. See https://golang.org/pkg/net/http/#Flusher

func (*Response) Header

func (r *Response) Header() engine.Header

Header implements `engine.Response#Header` function.

func (*Response) Hijack

func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error)

Hijack implements the http.Hijacker interface to allow an HTTP handler to take over the connection. See https://golang.org/pkg/net/http/#Hijacker

func (*Response) SetWriter

func (r *Response) SetWriter(w io.Writer)

SetWriter implements `engine.Response#SetWriter` function.

func (*Response) Size

func (r *Response) Size() int64

Size implements `engine.Response#Size` function.

func (*Response) Status

func (r *Response) Status() int

Status implements `engine.Response#Status` function.

func (*Response) Write

func (r *Response) Write(b []byte) (n int, err error)

Write implements `engine.Response#Write` function.

func (*Response) WriteHeader

func (r *Response) WriteHeader(code int)

WriteHeader implements `engine.Response#WriteHeader` function.

func (*Response) Writer

func (r *Response) Writer() io.Writer

Writer implements `engine.Response#Writer` function.

type Server

type Server struct {
	*http.Server
	// contains filtered or unexported fields
}

Server implements `engine.Server`.

func New

func New(addr string) *Server

New returns an instance of `standard.Server` with provided listen address.

func NewFromConfig

func NewFromConfig(c engine.Config) (s *Server)

NewFromConfig returns an instance of `standard.Server` from config.

func NewFromTLS

func NewFromTLS(addr, certfile, keyfile string) *Server

NewFromTLS returns an instance of `standard.Server` from TLS config.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements `http.Handler` interface.

func (*Server) SetHandler

func (s *Server) SetHandler(h engine.Handler)

SetHandler implements `engine.Server#SetHandler` function.

func (*Server) SetLogger

func (s *Server) SetLogger(l *log.Logger)

SetLogger implements `engine.Server#SetLogger` function.

func (*Server) Start

func (s *Server) Start() error

Start implements `engine.Server#Start` function.

type URL

type URL struct {
	*url.URL
	// contains filtered or unexported fields
}

URL implements `engine.URL`.

func (*URL) Path

func (u *URL) Path() string

Path implements `engine.URL#Path` function.

func (*URL) QueryParam

func (u *URL) QueryParam(name string) string

QueryParam implements `engine.URL#QueryParam` function.

func (*URL) QueryString

func (u *URL) QueryString() string

QueryString implements `engine.URL#QueryString` function.

func (*URL) SetPath

func (u *URL) SetPath(path string)

SetPath implements `engine.URL#SetPath` function.

Jump to

Keyboard shortcuts

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