Documentation
¶
Index ¶
Constants ¶
const ( MAINBOARD = "mainBoard" SIDEBOARD = "sideBoard" COMMANDER = "commanderBoard" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deck ¶
type Deck struct {
Code string `json:"code"`
Commander []string `json:"commander"`
MainBoard []string `json:"mainBoard"`
Name string `json:"name"`
ReleaseDate string `json:"releaseDate"`
SideBoard []string `json:"sideBoard"`
Type string `json:"type"`
}
Deck - Represents a MTGJSON deck
Code (string) - A 3 or 4 digit code as an identifier for the deck Commander (slice[string]) - A list of UUID's that represents the commander for the deck Mainboard (slice[string]) - A list of UUID's that represents the main board for the deck Name (string) - The name of the deck ReleaseDate (string) - The release date of the deck Sideboard (slice[string]) - A list of UUID's that represents the side board for the deck Type (string) - The deck type
func (*Deck) AddCards ¶
AddCards - Add a list of cards to a specific board within a deck. Card validation is not performed here as it is performed before this operation
Parameters: uuids (slice[string]) - A list of UUID's you want to add to your deck board (string) - The board you want to add to
Returns errors.ErrBoardNotExist - If the board does not exist
func (Deck) AllCards ¶
AllCards - Combine all boards into a list of UUID's
Parameters: None
Returns: allCard ([]string) - A list of all UUID's in the deck
func (Deck) CardExists ¶
CardExists - Ensure that a card exists on a specific board using a UUID
Parameters: uuid (string) - The uuid to check board (string) - The board you want to check. Can be either: mainBoard, sideBoard, commanderBoard
func (*Deck) DeleteCards ¶
DeleteCards - Delete a list of cards to a specific board within a deck. Card validation is not performed here as it is performed before this operation
Parameters: uuids (slice[string]) - A list of UUID's you want to remove from your deck board (string) - The board you want to add to
Returns errors.ErrBoardNotExist - If the board does not exist
type DeckUpdate ¶
type DeckUpdate struct {
MainBoard []string `json:"mainBoard"`
SideBoard []string `json:"sideBoard"`
Commander []string `json:"commander"`
}
func (DeckUpdate) AllCards ¶
func (d DeckUpdate) AllCards() []string
func (DeckUpdate) Count ¶
func (d DeckUpdate) Count() int