controller

package
v0.0.0-...-0e69807 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Validate *validator.Validate
	DB       *sql.DB
}

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL