Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { // Handle should handle HTTP requests. Handle(w http.ResponseWriter, r *http.Request) // AddRoute should allow the handler to configure itself accepting a router. AddRoute(r *mux.Router) }
Handler is responsible for defining a HTTP request route and corresponding handler.
type NotFoundHandler ¶
type NotFoundHandler struct { }
NotFoundHandler struct configures and responds to all invalid paths.
func NewNotFoundHandler ¶
func NewNotFoundHandler() *NotFoundHandler
NewNotFoundHandler creates a new NotFoundHandler and returns a pointer.
func (*NotFoundHandler) AddRoute ¶
func (h *NotFoundHandler) AddRoute(r *mux.Router)
AddRoute allows to configure itself accepting a router.
func (*NotFoundHandler) Handle ¶
func (h *NotFoundHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle will handle HTTP requests.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the struct that will hold references to all necessary data for running an http server.
func NewService ¶
NewService will run the setup process and create a Service that can be used to run a http api.
Click to show internal directories.
Click to hide internal directories.