package test
import "github.com/labstack/echo/test"
Index ¶
- func NewRequest(method, url string, body io.Reader) engine.Request
- type Cookie
- func (c *Cookie) Domain() string
- func (c *Cookie) Expires() time.Time
- func (c *Cookie) HTTPOnly() bool
- func (c *Cookie) Name() string
- func (c *Cookie) Path() string
- func (c *Cookie) Secure() bool
- func (c *Cookie) Value() string
- type Header
- func (h *Header) Add(key, val string)
- func (h *Header) Contains(key string) bool
- func (h *Header) Del(key string)
- func (h *Header) Get(key string) string
- func (h *Header) Keys() (keys []string)
- func (h *Header) Set(key, val string)
- type Pool
- 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) Committed() bool
- func (r *Response) Header() engine.Header
- 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 ResponseRecorder
- type Server
- func New(addr string) *Server
- func NewConfig(c *engine.Config) (s *Server)
- func NewTLS(addr, certFile, keyFile string) *Server
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) SetHandler(h engine.Handler)
- func (s *Server) SetLogger(l *log.Logger)
- func (s *Server) Start() error
- func (s *Server) Stop() error
- type URL
Functions ¶
func NewRequest ¶
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) Name ¶
Name implements `engine.Cookie#Name` function.
func (*Cookie) Path ¶
Path implements `engine.Cookie#Path` function.
func (*Cookie) Secure ¶
Secure implements `engine.Cookie#Secure` function.
func (*Cookie) Value ¶
Value implements `engine.Cookie#Value` function.
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
func (*Header) Add ¶
func (*Header) Contains ¶
func (*Header) Del ¶
func (*Header) Get ¶
func (*Header) Keys ¶
func (*Header) Set ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) Body ¶
func (*Request) ContentLength ¶
func (*Request) Cookie ¶
func (*Request) Cookies ¶
Cookies implements `engine.Request#Cookies` function.
func (*Request) FormFile ¶
func (r *Request) FormFile(name string) (*multipart.FileHeader, error)
func (*Request) FormParams ¶
func (*Request) FormValue ¶
func (*Request) Header ¶
func (*Request) Host ¶
func (*Request) IsTLS ¶
func (*Request) Method ¶
func (*Request) MultipartForm ¶
func (*Request) RealIP ¶
func (*Request) Referer ¶
func (*Request) RemoteAddress ¶
func (*Request) Scheme ¶
func (*Request) SetBody ¶
func (*Request) SetHost ¶
func (*Request) SetMethod ¶
func (*Request) SetURI ¶
func (*Request) URI ¶
func (*Request) URL ¶
func (*Request) UserAgent ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) Committed ¶
func (*Response) Header ¶
func (*Response) SetCookie ¶
SetCookie implements `engine.Response#SetCookie` function.
func (*Response) SetWriter ¶
func (*Response) Size ¶
func (*Response) Status ¶
func (*Response) Write ¶
func (*Response) WriteHeader ¶
func (*Response) Writer ¶
type ResponseRecorder ¶
func NewResponseRecorder ¶
func NewResponseRecorder() *ResponseRecorder
type Server ¶
func New ¶
func NewConfig ¶
func NewTLS ¶
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*Server) SetHandler ¶
func (*Server) SetLogger ¶
func (*Server) Start ¶
func (*Server) Stop ¶
type URL ¶
type URL struct {
// contains filtered or unexported fields
}
func (*URL) Path ¶
func (*URL) QueryParam ¶
func (*URL) QueryParams ¶
func (*URL) QueryString ¶
func (*URL) SetPath ¶
func (*URL) URL ¶
Source Files ¶
cookie.go header.go request.go response.go server.go url.go
- Version
- v2.2.0+incompatible
- Published
- Nov 9, 2016
- Platform
- js/wasm
- Imports
- 14 packages
- Last checked
- 4 hours ago –
Tools for package owners.