Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorStatus ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
func ErrorInfo ¶
func ErrorInfo(err error) (ErrorResponse, int)
type ErrorStatus ¶
type ErrorStatus struct {
// contains filtered or unexported fields
}
func (ErrorStatus) Unwrap ¶
func (e ErrorStatus) Unwrap() error
type Handler ¶
type Handler struct {
Hndl HandlerProvider
}
func NewHandler ¶
func NewHandler(s service.ServiceProvider) *Handler
type HandlerProvider ¶
type HandlerProvider interface { Mux() *http.ServeMux CreateJoke(w http.ResponseWriter, r *http.Request) error GetJoke(w http.ResponseWriter, r *http.Request) error GetAllJokes(w http.ResponseWriter, r *http.Request) error UpdateJoke(w http.ResponseWriter, r *http.Request) error DeleteJoke(w http.ResponseWriter, r *http.Request) error }
Click to show internal directories.
Click to hide internal directories.