Documentation
¶
Index ¶
- type Context
- type Decorator
- type H
- type HTTPServer
- func (s *HTTPServer) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (h *HTTPServer) SetHooks(hooks *Hooks)
- func (h *HTTPServer) SetListener(listener net.Listener)
- func (h *HTTPServer) SetTLSConfig(config *cryptoTls.Config)
- func (s *HTTPServer) Start() error
- func (s *HTTPServer) Stop() error
- type HTTPServerSettings
- type Handler
- type Hooks
- type Route
- type RouteGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Writer http.ResponseWriter Request *http.Request Route *Route RouteParams []string Aborted bool HeaderWritten bool // contains filtered or unexported fields }
func MakeContext ¶
func MakeContext(writer http.ResponseWriter, request *http.Request) *Context
func (*Context) AbortWithResponse ¶
func (*Context) AbortWithStatus ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func MakeHTTPServer ¶
func MakeHTTPServer(settings *HTTPServerSettings, routeGroups []*RouteGroup) (*HTTPServer, error)
func (*HTTPServer) ServeHTTP ¶
func (s *HTTPServer) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*HTTPServer) SetHooks ¶
func (h *HTTPServer) SetHooks(hooks *Hooks)
func (*HTTPServer) SetListener ¶
func (h *HTTPServer) SetListener(listener net.Listener)
func (*HTTPServer) SetTLSConfig ¶
func (h *HTTPServer) SetTLSConfig(config *cryptoTls.Config)
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start() error
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop() error
type HTTPServerSettings ¶
type HTTPServerSettings struct { TLS *tls.TLSSettings `json:"tls"` BindAddress string `json:"bind_address"` TCPRateLimits []*net.RateLimit `json:"tcp_rate_limits"` }
Settings for the JSON-RPC server
type RouteGroup ¶
type RouteGroup struct { Routes []*Route Handlers []Handler Subgroups []*RouteGroup }
Click to show internal directories.
Click to hide internal directories.