test

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(method, url string, body io.Reader) engine.Request

Types

type Cookie struct {
	*http.Cookie
}

Cookie implements `engine.Cookie`.

func (*Cookie) Domain

func (c *Cookie) Domain() string

Domain implements `engine.Cookie#Domain` function.

func (*Cookie) Expires

func (c *Cookie) Expires() time.Time

Expires implements `engine.Cookie#Expires` function.

func (*Cookie) HTTPOnly

func (c *Cookie) HTTPOnly() bool

HTTPOnly implements `engine.Cookie#HTTPOnly` function.

func (*Cookie) Name

func (c *Cookie) Name() string

Name implements `engine.Cookie#Name` function.

func (*Cookie) Path

func (c *Cookie) Path() string

Path implements `engine.Cookie#Path` function.

func (*Cookie) Secure

func (c *Cookie) Secure() bool

Secure implements `engine.Cookie#Secure` function.

func (*Cookie) Value

func (c *Cookie) Value() string

Value implements `engine.Cookie#Value` function.

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

func (*Header) Add

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

func (*Header) Contains

func (h *Header) Contains(key string) bool

func (*Header) Del

func (h *Header) Del(key string)

func (*Header) Get

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

func (*Header) Keys

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

func (*Header) Set

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

type Pool

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

type Request

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

func (*Request) Body

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

func (*Request) ContentLength

func (r *Request) ContentLength() int64

func (*Request) Cookie

func (r *Request) Cookie(name string) (engine.Cookie, error)

func (*Request) Cookies

func (r *Request) Cookies() []engine.Cookie

Cookies implements `engine.Request#Cookies` function.

func (*Request) FormFile

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

func (*Request) FormParams

func (r *Request) FormParams() map[string][]string

func (*Request) FormValue

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

func (*Request) Header

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

func (*Request) Host

func (r *Request) Host() string

func (*Request) IsTLS

func (r *Request) IsTLS() bool

func (*Request) Method

func (r *Request) Method() string

func (*Request) MultipartForm

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

func (*Request) Referer

func (r *Request) Referer() string

func (*Request) RemoteAddress

func (r *Request) RemoteAddress() string

func (*Request) Scheme

func (r *Request) Scheme() string

func (*Request) SetBody

func (r *Request) SetBody(reader io.Reader)

func (*Request) SetMethod

func (r *Request) SetMethod(method string)

func (*Request) SetURI

func (r *Request) SetURI(uri string)

func (*Request) URI

func (r *Request) URI() string

func (*Request) URL

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

func (*Request) UserAgent

func (r *Request) UserAgent() string

type Response

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

func (*Response) Committed

func (r *Response) Committed() bool

func (*Response) Header

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

func (*Response) SetCookie

func (r *Response) SetCookie(c engine.Cookie)

SetCookie implements `engine.Response#SetCookie` function.

func (*Response) SetWriter

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

func (*Response) Size

func (r *Response) Size() int64

func (*Response) Status

func (r *Response) Status() int

func (*Response) Write

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

func (*Response) WriteHeader

func (r *Response) WriteHeader(code int)

func (*Response) Writer

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

type ResponseRecorder

type ResponseRecorder struct {
	engine.Response
	Body *bytes.Buffer
}

func NewResponseRecorder

func NewResponseRecorder() *ResponseRecorder

type Server

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

func New

func New(addr string) *Server

func NewConfig

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

func NewTLS

func NewTLS(addr, certFile, keyFile string) *Server

func (*Server) ServeHTTP

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

func (*Server) SetHandler

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

func (*Server) SetLogger

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

func (*Server) Start

func (s *Server) Start()

type URL

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

func (*URL) Path

func (u *URL) Path() string

func (*URL) QueryParam

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

func (*URL) QueryParams

func (u *URL) QueryParams() map[string][]string

func (*URL) QueryString

func (u *URL) QueryString() string

func (*URL) SetPath

func (u *URL) SetPath(path string)

func (*URL) URL

func (u *URL) URL() *url.URL

Jump to

Keyboard shortcuts

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