Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	FeatureService service.FeatureService
	View           View
}

func NewHandler

func NewHandler(params Params) Handler

func (*Handler) List

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

swagger:route GET /features features listFeatures

Lists all available features

This endpoint lists all available features

Responses:
  default: HTTPError
  200: FeatureList
  500: HTTPError

type Item

type Item struct {
	// example: 12
	ID uint `json:"id"`

	// example: ControllerFullSupport
	Name string `json:"name"`

	// example: gamepad
	Icon string `json:"icon"`
}

swagger:model FeatureService

type List

type List []Item

swagger:model FeatureList

type Params

type Params struct {
	fx.In

	FeatureService service.FeatureService
	View           View
}

type View

type View struct{}

func NewView

func NewView() View

func (View) View

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

func (View) ViewList

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