Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryHandler ¶
type CategoryHandler struct {
// contains filtered or unexported fields
}
func NewCategoryHandler ¶
func NewCategoryHandler(service ICategoryService) (*CategoryHandler, error)
func (*CategoryHandler) GetFullCategories ¶
func (c *CategoryHandler) GetFullCategories(w http.ResponseWriter, r *http.Request)
GetFullCategories godoc
@Summary get all categories @Description get all categories @Tags category @Produce json @Success 200 {object} CategoryListResponse @Failure 405 {string} string @Failure 500 {string} string @Failure 222 {object} responses.ErrorResponse "Error" @Router /category/get_full [get]
func (*CategoryHandler) SearchCategoryHandler ¶
func (c *CategoryHandler) SearchCategoryHandler(w http.ResponseWriter, r *http.Request)
SearchCategoryHandler godoc
@Summary search category @Description search top 5 common named categories @Tags category @Produce json @Param searched query string true "searched string" @Success 200 {object} CategoryListResponse @Failure 405 {string} string @Failure 500 {string} string @Failure 222 {object} responses.ErrorResponse "Error" @Router /category/search [get]
type CategoryListResponse ¶
type CategoryListResponse struct { Status int `json:"status"` Body []*models.Category `json:"body"` }
func NewCategoryListResponse ¶
func NewCategoryListResponse(body []*models.Category) *CategoryListResponse
func (CategoryListResponse) MarshalEasyJSON ¶
func (v CategoryListResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CategoryListResponse) MarshalJSON ¶
func (v CategoryListResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CategoryListResponse) UnmarshalEasyJSON ¶
func (v *CategoryListResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CategoryListResponse) UnmarshalJSON ¶
func (v *CategoryListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.