Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrFailedToUnmarshalJSON request body processing error ErrFailedToUnmarshalJSON = errors.New("Failed to Unmarshal JSON") //ErrFailedToReadBody request body processing error ErrFailedToReadBody = errors.New("Failed to read request body") //ErrSomethingWrong request body processing error ErrSomethingWrong = errors.New("Something is wrong") //ErrInvalidRequest request body processing error ErrInvalidRequest = errors.New("Invalid Request Against this endpoint") )
Functions ¶
func RenderError ¶
func RenderError(res http.ResponseWriter, err error, customMessages ...string) error
RenderError help handler create a consistent error response
Types ¶
type StoryHandler ¶
type StoryHandler struct { StoryService story.Service CacheService chronicle.CacheService }
func (StoryHandler) RegisterRoutes ¶
func (h StoryHandler) RegisterRoutes(router *mux.Router)
type TopicHandler ¶
type TopicHandler struct { TopicService topic.Service CacheService chronicle.CacheService }
func (TopicHandler) RegisterRoutes ¶
func (h TopicHandler) RegisterRoutes(router *mux.Router)
Click to show internal directories.
Click to hide internal directories.