model

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Code      string  `json:"code"`
	Name      string  `json:"name"`
	Rarity    string  `json:"rarity"`
	Condition *string `json:"condition,omitempty"`
	Price     int     `json:"price"`
	Source    string  `json:"source"`
	Currency  string  `json:"currency"`
}

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 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

Jump to

Keyboard shortcuts

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