Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error embeds the standard error interface, along with a Status method that returns an HTTP status code.
type Handler ¶
type Handler struct { *Server H HandlerFunc }
Handler embeds the Server state and contains an H function that represents a handler for a certain HTTP route.
type HandlerFunc ¶
type Server ¶
type Server struct { DB *db.Database HS *http.Server Config config.Config // contains filtered or unexported fields }
Server holds the DB connection, and configured router for the http package.
type StatusError ¶
StatusError represents an HTTP error, containing an HTTP status code and the error that caused it.
func (StatusError) Error ¶
func (se StatusError) Error() string
Error satisifes the error interface.
func (StatusError) Status ¶
func (se StatusError) Status() int
Status satisifies the Error interface.
Click to show internal directories.
Click to hide internal directories.