Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Card ¶
type Card struct { ID uint32 `json:"-"` MTGJsonID string `json:"id" db:"mtg_json_id"` SetCode string `json:"setCode" db:"set_code"` SetName string `json:"setName" db:"set_name"` ReleaseDate time.Time `json:"date" db:"release_date"` Layout string `json:"layout"` Power string `json:"power,omitempty"` Toughness string `json:"toughness,omitempty"` Loyalty int `json:"loyalty,omitempty"` Hand int `json:"hand,omitempty"` Life int `json:"life,omitempty"` CMC float32 `json:"cmc,omitempty"` ManaCost string `json:"manaCost" db:"mana_cost"` Name string `json:"name"` Names StringSlice `json:"names,omitempty"` SearchName string `json:"search_name,omitempty" db:"search_name"` //ForeignNames []ForeignName `json:"foreignNames,omitempty"` Type string `json:"type"` Supertypes StringSlice `json:"supertypes" db:"super_types"` Types StringSlice `json:"types"` Subtypes StringSlice `json:"subtypes" db:"sub_types"` Colors StringSlice `json:"colors"` Rarity string `json:"rarity"` Text string `json:"text"` Timeshifted bool `json:"timeshifted,omitempty"` Reserved bool `json:"reserved,omitempty"` Starter bool `json:"starter"` Flavor string `json:"flavor"` MultiverseID int `json:"multiverseid" db:"multiverse_id"` Number string `json:"number"` // Variations []int `json:"variations,omitempty"` // MULTIVID Source string `json:"source,omitempty"` Watermark string `json:"watermark,omitempty"` Artist string `json:"artist"` ImageName string `json:"imageName" db:"image_name"` URL string `json:"url,omitempty"` ImageURL string `json:"image_url,omitempty"` SetURL string `json:"set_url,omitempty"` }
Card represents a Magic Card from a particular set
func (*Card) IsBasicLand ¶
IsBasicLand returns true if the card is a basic land type
type ForeignName ¶
type Set ¶
type Set struct { Name string `json:"name"` Code string `json:"code"` GathererCode string `json:"gathererCode,omitempty"` OldCode string `json:"oldCode,omitempty"` MagicCardsInfoCode string `json:"magicCardsInfoCode,omitempty"` ReleaseDate string `json:"releaseDate"` Border string `json:"border"` SetType string `json:"type"` Block string `json:"block"` OnlineOnly bool `json:"onlineOnly,omitempty"` Cards []*Card `json:"cards"` }
Set represents a particular set of magic cards
type StringSlice ¶
type StringSlice []string
StringSlice implements the Valuer/Scanner interfaces to save to the database
func (*StringSlice) Scan ¶
func (s *StringSlice) Scan(src interface{}) error
Scan implements the Scanner interface for database/sql
func (StringSlice) ToLower ¶
func (s StringSlice) ToLower() StringSlice
ToLower returns a new StringSlice with all elemets lowercased
Click to show internal directories.
Click to hide internal directories.