handlers

package
v0.0.0-...-b4fda3b Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomHTTPErrorHandler

func CustomHTTPErrorHandler(err error, c echo.Context)

func SetupRoutes

func SetupRoutes(app *echo.Echo, p *PlayerHandler)

Types

type PlayerHandler

type PlayerHandler struct {
	PlayerService PlayerService
}

func New

func (*PlayerHandler) HandlerShowPlayerById

func (ph *PlayerHandler) HandlerShowPlayerById(c echo.Context) error

func (*PlayerHandler) HandlerShowPlayers

func (ph *PlayerHandler) HandlerShowPlayers(c echo.Context) error

func (*PlayerHandler) View

func (ph *PlayerHandler) View(c echo.Context, cmp templ.Component) error

type PlayerService

type PlayerService interface {
	GetAllPlayers() ([]*services.Player, error)
	GetPlayerById(id int) (services.Player, error)
}

Jump to

Keyboard shortcuts

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