Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Address string
TLSCertfile string
TLSKeyfile string
ReadTimeout time.Duration
WriteTimeout time.Duration
}
Config defines engine configuration.
type Handler ¶
Handler defines an interface to server HTTP requests via `ServeHTTP(Request, Response)` function.
type HandlerFunc ¶
HandlerFunc is an adapter to allow the use of `func(Request, Response)` as HTTP handlers.
func (HandlerFunc) ServeHTTP ¶
func (h HandlerFunc) ServeHTTP(req Request, res Response)
ServeHTTP serves HTTP request.
type Request ¶
type Request interface {
// TLS returns true if connection is TLS otherwise false.
TLS() bool
Scheme() string
Host() string
URI() string
URL() URL
Header() Header
// Proto() string
// ProtoMajor() int
// ProtoMinor() int
UserAgent() string
RemoteAddress() string
Method() string
SetMethod(string)
Body() io.ReadCloser
FormValue(string) string
FormFile(string) (*multipart.FileHeader, error)
MultipartForm() (*multipart.Form, error)
}
Request defines the interface for HTTP request.
Click to show internal directories.
Click to hide internal directories.