Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	GenreService service.GenreService
	View         View
}

func NewHandler

func NewHandler(params Params) Handler

func (*Handler) List

func (h *Handler) List(c echo.Context) error

swagger:route GET /genres genres listGenres

Lists all available genres

This endpoint lists all available genres

Responses:
  default: HTTPError
  200: GenreList
  500: HTTPError

type Item

type Item struct {
	// read-only: true
	// example: 12
	ID uint `json:"id"`

	// example: Strategy
	// read-only: true
	Name string `json:"name"`
}

swagger:model Genre

type List

type List []Item

swagger:model GenreList

type Params

type Params struct {
	fx.In

	GenreService service.GenreService
	View         View
}

type View

type View struct{}

func NewView

func NewView() View

func (View) View

func (v View) View(t entity.Genre) Item

func (View) ViewList

func (v View) ViewList(tags []entity.Genre) List