Documentation ¶
Index ¶
- Constants
- Variables
- func Bulk(c *Context, q string, p ...[]interface{}) error
- func Delete(c *Context, q string, p ...interface{}) error
- func Init() error
- func Insert(c *Context, q string, p ...interface{}) error
- func NewAssetID(id string) string
- func NewRarityID(n string) string
- func NewSchema() (graphql.Schema, error)
- func NewSchemaConfig() graphql.SchemaConfig
- func Query(c *Context, q string, i Iterable, p ...interface{}) error
- func QueryOne(c *Context, q string, s Scannable, p ...interface{}) error
- type BulkIterator
- type Card
- type CardData
- type Context
- type Iterable
- type Iterator
- type QueryResult
- type Rarity
- type Scannable
- type Scanner
- type Set
- type SetAsset
Constants ¶
View Source
const ( // Rarity names RarityCommon = "Common" RarityUncommon = "Uncommon" RarityRare = "Rare" RarityMythicRare = "Mythic Rare" RaritySpecial = "Special" RarityLand = "Land" RarityPromo = "Promo" RarityBonus = "Bonus" // Rarity aliases RarityAliasCommon = "C" RarityAliasUncommon = "U" RarityAliasRare = "R" RarityAliasMythicRare = "M" RarityAliasSpecial = "S" RarityAliasLand = "L" RarityAliasPromo = "P" RarityAliasBonus = "B" )
Variables ¶
View Source
var ( ErrInit = errors.New("model.ErrInit") ErrNotFound = errors.New("model.ErrNotFound") ErrBlankContext = errors.New("model.ErrBlankContext") )
View Source
var (
ErrInvalidState = errors.New("ErrInvalidState")
)
Functions ¶
func NewAssetID ¶
func NewRarityID ¶
func NewSchemaConfig ¶
func NewSchemaConfig() graphql.SchemaConfig
Types ¶
type BulkIterator ¶
type BulkIterator func() []interface{}
type Card ¶
type Card struct { ID string `json:"id"` Name string `json:"name"` Types []string `json:"types"` Costs []string `json:"costs"` NumberCost float32 `json:"numberCost"` IDExternal string `json:"idExternal"` OrderExternal string `json:"orderExternal"` IDRarity string `json:"-"` Rarity Rarity `json:"rarity"` IDSet string `json:"-"` Set Set `json:"set"` IDAsset string `json:"idAsset"` Rules []string `json:"rules"` Rate float32 `json:"rate"` RateVotes int `json:"rateVotes"` Artist string `json:"artist"` Flavor string `json:"flavor"` Data CardData `json:"data"` // contains filtered or unexported fields }
func NewSetCards ¶
func NewSetCards() []Card
type Context ¶
func MakeContext ¶
type QueryResult ¶
type Rarity ¶
type Rarity struct { ID string `json:"id"` Name string `json:"name"` Alias string `json:"alias"` // contains filtered or unexported fields }
func RarityByAlias ¶
Click to show internal directories.
Click to hide internal directories.