Documentation ¶
Index ¶
- func NotFound(w ResponseWriter)
- type Handler
- type HandlerFunc
- type Listener
- type Mux
- func (m *Mux) Handle(pattern string, handler Handler) *Mux
- func (m *Mux) HandleFunc(pattern string, handler func(ResponseWriter, *Request)) *Mux
- func (m *Mux) HandleW(pattern string, h func(http.ResponseWriter)) *Mux
- func (m *Mux) Prefix(v string)
- func (m *Mux) ServeHTTP(w ResponseWriter, r *Request)
- func (m *Mux) Static(prefix string, path string) *Mux
- type Option
- type Options
- type Request
- type ResponseWriter
- type Server
- type TLS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NotFound ¶
func NotFound(w ResponseWriter)
Types ¶
type HandlerFunc ¶
type HandlerFunc = http.HandlerFunc
type Mux ¶
func NewServeMux ¶
NewServeMux allocates and returns a new ServeMux.
func (*Mux) HandleFunc ¶
func (m *Mux) HandleFunc(pattern string, handler func(ResponseWriter, *Request)) *Mux
func (*Mux) ServeHTTP ¶
func (m *Mux) ServeHTTP(w ResponseWriter, r *Request)
type Option ¶
type Option func(*Options)
func HttpsRedirect ¶
func WithLogger ¶
func WithPortRoll ¶
func WithServerConfig ¶
type Options ¶
type Options struct { Https bool HttpsRedirect bool HttpsRedirectAddress string HttpsCert string HttpsKey string HttpsDomain string PortRoll bool IdleTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration Logger *logger.Logger Zone string }
func (*Options) IsAutoHttpsCert ¶
type ResponseWriter ¶
type ResponseWriter = http.ResponseWriter
Click to show internal directories.
Click to hide internal directories.