Documentation ¶
Index ¶
- type Controller
- func (ctr *Controller) AllLeagueStandingsHandler(c echo.Context) error
- func (ctr *Controller) ClubStandingsHandler(c echo.Context) error
- func (ctr *Controller) ContainLettersHandler(c echo.Context) error
- func (ctr *Controller) GetCarsHandler(c echo.Context) error
- func (ctr *Controller) RecordGameHandler(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
func NewController ¶
func NewController(validate *validator.Validate, db *sql.DB) *Controller
func (*Controller) AllLeagueStandingsHandler ¶
func (ctr *Controller) AllLeagueStandingsHandler(c echo.Context) error
AllLeagueStandingsHandler godoc @ID all-league-standings-handler @Summary All league standings @Description get league standings @Accept json @Produce json @Success 200 {object} model.SuccessResult @Failure 400 {object} model.BadRequestResult @Failure 500 {object} model.InternalServerErrorResult @Router /football/leaguestanding [get]
func (*Controller) ClubStandingsHandler ¶
func (ctr *Controller) ClubStandingsHandler(c echo.Context) error
ClubStandingsHandler godoc @ID club-standings-handler @Summary Club standings @Description get club by name @Accept json @Produce json @Param clubname query string true "club search by clubname" @Success 200 {object} model.SuccessResult @Failure 400 {object} model.BadRequestResult @Failure 404 {object} model.NotFoundResult @Failure 500 {object} model.InternalServerErrorResult @Router /football/rank [get]
func (*Controller) ContainLettersHandler ¶
func (ctr *Controller) ContainLettersHandler(c echo.Context) error
ContainLettersHandler godoc @ID contain-letters-handler @Accept json @Produce json @Param ContainLettersRequest body model.ContainLettersRequest true "Contain Letters" @Success 200 {object} model.SuccessResult @Failure 400 {object} model.BadRequestResult @Failure 500 {object} model.InternalServerErrorResult @Router /is-contain-letters [post]
func (*Controller) GetCarsHandler ¶
func (ctr *Controller) GetCarsHandler(c echo.Context) error
GetCarsHandler godoc @ID get-cars-handler @Summary Get cars @Description get cars with the corresponding type @Accept json @Produce json @Success 200 {object} model.SuccessResult @Failure 500 {object} model.InternalServerErrorResult @Router /cars [get]
func (*Controller) RecordGameHandler ¶
func (ctr *Controller) RecordGameHandler(c echo.Context) error
RecordGameHandler godoc @ID record-game-handler @Accept json @Produce json @Param RecordGameRequest body []model.RecordGameRequest true "Record Game" @Success 200 {object} model.SuccessResult @Failure 400 {object} model.BadRequestResult @Failure 404 {object} model.NotFoundResult @Failure 500 {object} model.InternalServerErrorResult @Router /football/recordgame [post]