Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct { Value string `json:"value" example:"ACE"` Suit string `json:"suit" example:"SPADES"` Code string `json:"code" example:"AS"` }
Card represents a card. @Description represents a card
type Cards ¶
type Cards struct {
Cards []Card `json:"cards"`
}
Cards represents a collection of cards. @Description represents a collection of cards
func DomainCardsToCards ¶ added in v0.1.3
DomainCardsToCards transforms domain cards to Cards.
type DeckClosed ¶
type DeckClosed struct { ID string `json:"deck_id" example:"f6afe993-9847-508e-b206-2487f1ef5a3c"` Shuffled bool `json:"shuffled" example:"true"` Remaining int `json:"remaining" example:"1"` }
DeckClosed represents a closed deck of cards. @Description represents a closed deck of cards
func DomainDeckToDeckClosed ¶ added in v0.1.3
func DomainDeckToDeckClosed(d *deck.Deck) *DeckClosed
DomainDeckToDeckClosed transforms a domain deck to a DeckClosed.
type DeckOpened ¶
type DeckOpened struct { DeckClosed Cards []Card `json:"cards"` }
DeckOpened represents a opened deck of cards. @Description represents a opened deck of cards
func DomainDeckToDeckOpened ¶ added in v0.3.0
func DomainDeckToDeckOpened(d *deck.Deck) *DeckOpened
DomainDeckToDeckOpened transforms a domain deck to a DeckOpened.
type Error ¶
type Error struct {
Error string `json:"error"`
}
Error defines the structure for a failed response. @Description defines the structure for a failed response
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the main HTTP server.
func NewServer ¶
func NewServer( debug bool, host string, port int, logger *logger.Logger, build *build.Info, repo repo.Repository, ) *Server
NewServer creates a new Server.