Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CardResponse ¶
type CreateDeckHandler ¶
type CreateDeckHandler struct {
// contains filtered or unexported fields
}
CreateDeckHandler represents http handler for deck creation operations.
func NewCreateDeckHandler ¶
func NewCreateDeckHandler(createDeckService deck.CreateDeckService) *CreateDeckHandler
NewCreateDeckHandler creates and returns a new handler for serving create deck endpoint.
func (*CreateDeckHandler) CreateDeck ¶
func (d *CreateDeckHandler) CreateDeck(c *gin.Context)
CreateDeck create a new deck. It accepts shuffle and cards query params. It returns the deck as a http response.
type DeckResponse ¶
type DeckWithCardsResponse ¶
type DeckWithCardsResponse struct { DeckResponse Cards []CardResponse `json:"cards"` }
type DrawCardsHandler ¶
type DrawCardsHandler struct {
// contains filtered or unexported fields
}
DrawCardsHandler represents http handler for card-draw operations.
func NewDrawCardsHandler ¶
func NewDrawCardsHandler(drawCardsService deck.DrawCardsService) *DrawCardsHandler
NewDrawCardsHandler creates and returns a new handler for serving card-draw endpoint.
func (*DrawCardsHandler) DrawCards ¶
func (d *DrawCardsHandler) DrawCards(c *gin.Context)
DrawCards draws card(s) from the requested deck. It returns the drawn cards.
type OpenDeckHandler ¶
type OpenDeckHandler struct {
// contains filtered or unexported fields
}
OpenDeckHandler represents http handler for deck retrival operations.
func NewOpenDeckHandler ¶
func NewOpenDeckHandler(openDeckService deck.OpenDeckService) *OpenDeckHandler
NewOpenDeckHandler creates and returns a new handler for serving open-deck endpoint.
func (*OpenDeckHandler) OpenDeck ¶
func (d *OpenDeckHandler) OpenDeck(c *gin.Context)
OpenDeck return a given deck by its UUID. It returns the deck as a http response.