Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMap = map[error]resterr.RESTErr{}
ErrMap is the mapping between business layer errors (services) and the JSON errors we want to send back from the REST API.
All expected errors resulting from downstream processing should be mapped here. Errors that are not mapped are sent to the client as a 500 error without details.
Functions ¶
This section is empty.
Types ¶
type BarHandler ¶
type BarHandler struct {
// contains filtered or unexported fields
}
BarHandler implements HTTP handlers and processes requests related to the bar resource.
func NewHandler ¶
func NewHandler(logger *slog.Logger, barSvc barService, errHandler errHandler) (*BarHandler, error)
NewHandler instantiates a new BarHandler struct.
func (*BarHandler) Get ¶
func (bh *BarHandler) Get(w http.ResponseWriter, r *http.Request)
Get mimics an HTTP handler for fetching a bar resource.
Click to show internal directories.
Click to hide internal directories.