Documentation ¶
Index ¶
- Constants
- type Header
- type Request
- func (r *Request) BasicAuth() (username, password string, ok bool)
- func (r *Request) Body() io.ReadCloser
- func (r *Request) Context() context.Context
- func (r *Request) Cookie(key string) string
- func (r *Request) Form() engine.URLValuer
- func (r *Request) FormFile(key string) (multipart.File, *multipart.FileHeader, error)
- 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) MaxSize() int
- func (r *Request) Method() string
- func (r *Request) MultipartForm() (*multipart.Form, error)
- func (r *Request) Object() interface{}
- func (r *Request) PostForm() engine.URLValuer
- func (r *Request) Proto() string
- 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) SetMaxSize(maxSize int)
- func (r *Request) SetMethod(method string)
- func (r *Request) SetURI(uri string)
- func (r *Request) SetValue(key string, value interface{})
- func (r *Request) Size() int64
- func (r *Request) StdRequest() *http.Request
- func (r *Request) URI() string
- func (r *Request) URL() engine.URL
- func (r *Request) UserAgent() string
- func (r *Request) WithContext(ctx context.Context) *http.Request
- type Response
- func (r *Response) Body() []byte
- func (r *Response) Committed() bool
- func (r *Response) Error(errMsg string, args ...int)
- func (r *Response) Flush()
- func (r *Response) Header() engine.Header
- func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (r *Response) Hijacker(fn func(net.Conn)) error
- func (r *Response) KeepBody(on bool)
- func (r *Response) NotFound()
- func (r *Response) Object() interface{}
- func (r *Response) Redirect(url string, code int)
- func (r *Response) ServeContent(content io.ReadSeeker, name string, modtime time.Time)
- func (r *Response) ServeFile(file string)
- func (r *Response) SetCookie(cookie *http.Cookie)
- func (r *Response) SetWriter(w io.Writer)
- func (r *Response) Size() int64
- func (r *Response) Status() int
- func (r *Response) StdResponseWriter() http.ResponseWriter
- func (r *Response) Stream(step func(io.Writer) bool) (err error)
- func (r *Response) Write(b []byte) (n int, err error)
- func (r *Response) WriteHeader(code int)
- func (r *Response) Writer() io.Writer
- type Server
- func (s *Server) Config() *engine.Config
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) SetHandler(h engine.Handler)
- func (s *Server) SetLogger(l logger.Logger)
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) Start() error
- func (s *Server) Stop() error
- type URL
- func (u *URL) Object() interface{}
- func (u *URL) Path() string
- func (u *URL) Query() url.Values
- func (u *URL) QueryValue(name string) string
- func (u *URL) QueryValues(name string) []string
- func (u *URL) RawPath() string
- func (u *URL) RawQuery() string
- func (u *URL) SetPath(path string)
- func (u *URL) SetRawQuery(rawQuery string)
- func (u *URL) String() string
- type UrlValue
- func (u *UrlValue) Add(key string, value string)
- func (u *UrlValue) All() map[string][]string
- func (u *UrlValue) Del(key string)
- func (u *UrlValue) Encode() string
- func (u *UrlValue) Get(key string) string
- func (u *UrlValue) Gets(key string) []string
- func (u *UrlValue) Merge(data url.Values)
- func (u *UrlValue) Reset(data url.Values)
- func (u *UrlValue) Set(key string, value string)
- type Value
- func (v *Value) Add(key string, value string)
- func (v *Value) All() map[string][]string
- func (v *Value) Del(key string)
- func (v *Value) Encode() string
- func (v *Value) Get(key string) string
- func (v *Value) Gets(key string) []string
- func (v *Value) Merge(data url.Values)
- func (v *Value) Reset(data url.Values)
- func (v *Value) Set(key string, value string)
Constants ¶
View Source
const Name = `standard`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func (*Request) Body ¶
func (r *Request) Body() io.ReadCloser
func (*Request) RemoteAddress ¶
func (*Request) SetMaxSize ¶ added in v1.6.0
func (*Request) StdRequest ¶
type Response ¶
type Response struct { http.ResponseWriter // contains filtered or unexported fields }
func NewResponse ¶
func (*Response) ServeContent ¶ added in v1.6.0
func (*Response) StdResponseWriter ¶
func (r *Response) StdResponseWriter() http.ResponseWriter
func (*Response) WriteHeader ¶
type Server ¶
func NewWithConfig ¶
func NewWithTLS ¶
func NewWithTLS(addr, certFile, keyFile string, opts ...engine.ConfigSetter) *Server
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements `http.Handler` interface.
func (*Server) SetHandler ¶
type URL ¶
type URL struct {
// contains filtered or unexported fields
}
func (*URL) QueryValue ¶
func (*URL) QueryValues ¶
func (*URL) SetRawQuery ¶ added in v1.1.1
Click to show internal directories.
Click to hide internal directories.