Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetHandler ¶
type GetHandler struct { }
GetHandler is the HTTP handler for the "Get Person" endpoint In this simplified example we are assuming all possible errors are user errors and returning "bad request" HTTP 400 or "not found" HTTP 404 There are some programmer errors possible but hopefully these will be caught in testing.
func (*GetHandler) ServeHTTP ¶
func (h *GetHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
ServeHTTP implements http.Handler
type ListHandler ¶
type ListHandler struct { }
ListHandler is the HTTP handler for the "List Do people" endpoint In this simplified example we are assuming all possible errors are system errors (HTTP 500)
func (*ListHandler) ServeHTTP ¶
func (h *ListHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
ServeHTTP implements http.Handler
type RegisterHandler ¶
type RegisterHandler struct { }
RegisterHandler is the HTTP handler for the "Register" endpoint In this simplified example we are assuming all possible errors are user errors and returning "bad request" HTTP 400. There are some programmer errors possible but hopefully these will be caught in testing.
func (*RegisterHandler) ServeHTTP ¶
func (h *RegisterHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
ServeHTTP implements http.Handler