Documentation
¶
Index ¶
- func WrapHandler(h http.Handler) echo.HandlerFunc
- func WrapMiddleware(m func(http.Handler) http.Handler) echo.MiddlewareFunc
- type Cookie
- type Header
- type Request
- func (r *Request) Body() io.Reader
- func (r *Request) ContentLength() int64
- func (r *Request) Cookie(name string) (engine.Cookie, error)
- func (r *Request) Cookies() []engine.Cookie
- func (r *Request) FormFile(name string) (*multipart.FileHeader, error)
- func (r *Request) FormParams() map[string][]string
- func (r *Request) FormValue(name string) string
- func (r *Request) Header() engine.Header
- func (r *Request) Host() string
- func (r *Request) IsTLS() bool
- func (r *Request) Method() string
- func (r *Request) MultipartForm() (*multipart.Form, error)
- func (r *Request) RealIP() string
- func (r *Request) Referer() string
- func (r *Request) RemoteAddress() string
- func (r *Request) Scheme() string
- func (r *Request) SetBody(reader io.Reader)
- func (r *Request) SetHost(host string)
- func (r *Request) SetMethod(method string)
- func (r *Request) SetURI(uri string)
- func (r *Request) URI() string
- func (r *Request) URL() engine.URL
- func (r *Request) UserAgent() string
- type Response
- func (r *Response) CloseNotify() <-chan bool
- func (r *Response) Committed() bool
- func (r *Response) Flush()
- func (r *Response) Header() engine.Header
- func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (r *Response) SetCookie(c engine.Cookie)
- func (r *Response) SetWriter(w io.Writer)
- func (r *Response) Size() int64
- func (r *Response) Status() int
- func (r *Response) Write(b []byte) (n int, err error)
- func (r *Response) WriteHeader(code int)
- func (r *Response) Writer() io.Writer
- type Server
- type URL
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`.
Types ¶
type Cookie ¶
Cookie implements `engine.Cookie`.
func (*Cookie) Domain ¶
Domain implements `engine.Cookie#Domain` function.
func (*Cookie) Expires ¶
Expires implements `engine.Cookie#Expires` function.
func (*Cookie) HTTPOnly ¶
HTTPOnly implements `engine.Cookie#HTTPOnly` function.
func (*Cookie) Secure ¶
Secure implements `engine.Cookie#Secure` function.
type Header ¶
Header implements `engine.Header`.
func (*Header) Add ¶
Add implements `engine.Header#Add` function.
func (*Header) Contains ¶
Contains implements `engine.Header#Contains` function.
func (*Header) Get ¶
Get implements `engine.Header#Get` function.
func (*Header) Keys ¶
Keys implements `engine.Header#Keys` function.
type Request ¶
Request implements `engine.Request`.
func NewRequest ¶
NewRequest returns `Request` instance.
func (*Request) Body ¶
Body implements `engine.Request#Body` function.
func (*Request) ContentLength ¶
ContentLength implements `engine.Request#ContentLength` function.
func (*Request) Cookie ¶
Cookie implements `engine.Request#Cookie` function.
func (*Request) Cookies ¶
Cookies implements `engine.Request#Cookies` function.
func (*Request) FormFile ¶
func (r *Request) FormFile(name string) (*multipart.FileHeader, error)
FormFile implements `engine.Request#FormFile` function.
func (*Request) FormParams ¶
FormParams implements `engine.Request#FormParams` function.
func (*Request) FormValue ¶
FormValue implements `engine.Request#FormValue` function.
func (*Request) Header ¶
Header implements `engine.Request#Header` function.
func (*Request) Host ¶
Host implements `engine.Request#Host` function.
func (*Request) IsTLS ¶
IsTLS implements `engine.Request#TLS` function.
func (*Request) Method ¶
Method implements `engine.Request#Method` function.
func (*Request) MultipartForm ¶
MultipartForm implements `engine.Request#MultipartForm` function.
func (*Request) RealIP ¶
RealIP implements `engine.Request#RealIP` function.
func (*Request) Referer ¶
Referer implements `engine.Request#Referer` function.
func (*Request) RemoteAddress ¶
RemoteAddress implements `engine.Request#RemoteAddress` function.
func (*Request) Scheme ¶
Scheme implements `engine.Request#Scheme` function.
func (*Request) SetBody ¶
SetBody implements `engine.Request#SetBody` function.
func (*Request) SetHost ¶
SetHost implements `engine.Request#SetHost` function.
func (*Request) SetMethod ¶
SetMethod implements `engine.Request#SetMethod` function.
func (*Request) SetURI ¶
SetURI implements `engine.Request#SetURI` function.
func (*Request) URL ¶
URL implements `engine.Request#URL` function.
type Response ¶
type Response struct { http.ResponseWriter // contains filtered or unexported fields }
Response implements `engine.Response`.
func NewResponse ¶
func NewResponse(w http.ResponseWriter, l log.Logger) (r *Response)
NewResponse returns `Response` instance.
func (*Response) CloseNotify ¶
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 ¶
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 ¶
Header implements `engine.Response#Header` function.
func (*Response) Hijack ¶
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) SetCookie ¶
SetCookie implements `engine.Response#SetCookie` function.
func (*Response) SetWriter ¶
SetWriter implements `engine.Response#SetWriter` function.
func (*Response) Size ¶
Size implements `engine.Response#Size` function.
func (*Response) Status ¶
Status implements `engine.Response#Status` function.
func (*Response) Write ¶
Write implements `engine.Response#Write` function.
func (*Response) WriteHeader ¶
WriteHeader implements `engine.Response#WriteHeader` function.
type Server ¶
Server implements `engine.Server`.
func New ¶
New returns `Server` instance with provided listen address.
func WithConfig ¶
WithConfig returns `Server` instance with provided config.
func WithTLS ¶
WithTLS returns `Server` instance with provided TLS config.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements `http.Handler` interface.
func (*Server) SetHandler ¶
SetHandler implements `engine.Server#SetHandler` function.
func (*Server) SetLogger ¶
SetLogger implements `engine.Server#SetLogger` function.
func (*Server) Start ¶
Start implements `engine.Server#Start` function.
Source Files
¶
- cookie.go
- header.go
- request.go
- response.go
- server.go
- url.go