model

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type BanStatus added in v0.1.7

type BanStatus string
const (
	BanStatusUnlimited   BanStatus = "UNLIMITED"
	BanStatusSemiLimited BanStatus = "SEMI_LIMITED"
	BanStatusLimited     BanStatus = "LIMITED"
	BanStatusForbidden   BanStatus = "FORBIDDEN"
)

func (BanStatus) IsValid added in v0.1.7

func (e BanStatus) IsValid() bool

func (BanStatus) MarshalGQL added in v0.1.7

func (e BanStatus) MarshalGQL(w io.Writer)

func (BanStatus) String added in v0.1.7

func (e BanStatus) String() string

func (*BanStatus) UnmarshalGQL added in v0.1.7

func (e *BanStatus) UnmarshalGQL(v interface{}) error

type Card

type Card struct {
	Code      string      `json:"code"`
	JpName    string      `json:"jpName"`
	Rarity    string      `json:"rarity"`
	Condition *string     `json:"condition,omitempty"`
	Price     int         `json:"price"`
	Source    string      `json:"source"`
	Currency  *Currency   `json:"currency"`
	Image     *string     `json:"image,omitempty"`
	Score     *int        `json:"score,omitempty"`
	Game      *Game       `json:"game,omitempty"`
	Detail    *DetailInfo `json:"detail,omitempty"`
}

func ToCard

func ToCard(card *source.Card) *Card

func ToCards

func ToCards(cards []*source.Card) []*Card

type Currency

type Currency struct {
	Code        string `json:"code"`
	NumericCode string `json:"numericCode"`
	Fraction    int    `json:"fraction"`
	Grapheme    string `json:"grapheme"`
	Template    string `json:"template"`
	Decimal     string `json:"decimal"`
	Thousand    string `json:"thousand"`
}

func ToCurrency

func ToCurrency(currency *currency.Currency) *Currency

type DetailInfo added in v0.1.7

type DetailInfo struct {
	EngName     *string    `json:"engName,omitempty"`
	CardType    *string    `json:"cardType,omitempty"`
	Property    *string    `json:"property,omitempty"`
	Attribute   *string    `json:"attribute,omitempty"`
	Types       []*string  `json:"types,omitempty"`
	Level       *string    `json:"level,omitempty"`
	LinkArrows  *string    `json:"linkArrows,omitempty"`
	Attack      *string    `json:"attack,omitempty"`
	Defence     *string    `json:"defence,omitempty"`
	Link        *string    `json:"link,omitempty"`
	EffectTypes []*string  `json:"effectTypes,omitempty"`
	Effect      *string    `json:"effect,omitempty"`
	Pendulum    *Pendulum  `json:"pendulum,omitempty"`
	Status      *BanStatus `json:"status,omitempty"`
	Power       *string    `json:"power,omitempty"`
	Colors      []*string  `json:"colors,omitempty"`
	Product     *string    `json:"product,omitempty"`
	Rarity      *string    `json:"rarity,omitempty"`
	Life        *string    `json:"life,omitempty"`
	Category    *string    `json:"category,omitempty"`
	Cost        *string    `json:"cost,omitempty"`
	Counter     *string    `json:"counter,omitempty"`
	Traits      []*string  `json:"traits,omitempty"`
	Trigger     *string    `json:"trigger,omitempty"`
	Soul        *string    `json:"soul,omitempty"`
}

func ToDetailInfo added in v0.1.7

func ToDetailInfo(d *source.DetailInfo) *DetailInfo

type ExchangeRate

type ExchangeRate struct {
	From *Currency `json:"from"`
	To   *Currency `json:"to"`
	Rate float64   `json:"rate"`
}

func ToRate

func ToRate(rate *rate.ExchangeRate) *ExchangeRate

func ToRates

func ToRates(rates []*rate.ExchangeRate) []*ExchangeRate

type Game added in v0.1.4

type Game struct {
	Title string   `json:"title"`
	Image *string  `json:"image,omitempty"`
	Code  GameCode `json:"code"`
}

func ToGame added in v0.1.4

func ToGame(game *game.Game) *Game

func ToGames added in v0.1.4

func ToGames(games []*game.Game) []*Game

type GameCode added in v0.1.4

type GameCode string
const (
	GameCodeYgo GameCode = "YGO"
	GameCodeOpc GameCode = "OPC"
	GameCodeWs  GameCode = "WS"
)

func (GameCode) IsValid added in v0.1.4

func (e GameCode) IsValid() bool

func (GameCode) MarshalGQL added in v0.1.4

func (e GameCode) MarshalGQL(w io.Writer)

func (GameCode) String added in v0.1.4

func (e GameCode) String() string

func (*GameCode) UnmarshalGQL added in v0.1.4

func (e *GameCode) UnmarshalGQL(v interface{}) error

type Pendulum added in v0.1.7

type Pendulum struct {
	EffectTypes []*string `json:"effectTypes,omitempty"`
	Scale       *string   `json:"scale,omitempty"`
	Effect      *string   `json:"effect,omitempty"`
}

func ToPendulum added in v0.1.7

func ToPendulum(p *source.Pendulum) *Pendulum

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL