v1

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

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGameHandlers

func NewGameHandlers(v1 *echo.Group, commands CommandBus, queries QueryBus, logger logger.Logger)

Types

type CommandBus

type CommandBus interface {
	Dispatch(context.Context, core.Command) (any, error)
}

type GameHandlers

type GameHandlers struct {
	Commands CommandBus
	Queries  QueryBus

	Logger logger.Logger
	// contains filtered or unexported fields
}

func (*GameHandlers) Create

func (g *GameHandlers) Create(c echo.Context) error

Create godoc @Summary Create game @Description Create gamr handler @Tags Game @Accept json @Produce json @Success 201 @Router /game [post] @BasePath /v1

func (*GameHandlers) Fetch

func (g *GameHandlers) Fetch(c echo.Context) error

Fetch godoc @Summary Fetch games @Description Fetch games handler @Tags Game @Accept json @Produce json @Success 201 {object} entity.Game @Router /game [get]

type QueryBus

type QueryBus interface {
	Ask(context.Context, core.Query) (any, error)
}

Jump to

Keyboard shortcuts

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