Documentation ¶
Index ¶
- func NewBookmarkRepo(db *gorm.DB) *bookmarkRepo
- type AssociationType
- type Bookmark
- type CardPrice
- type Deck
- type DeckCard
- type Manager
- func (r Manager) AddBookmark(cardID string) error
- func (m *Manager) AddCardToDeck(deck Deck, cardID, cardName string, count int, association AssociationType) error
- func (m *Manager) CardSearch(sr SearchRequest) ([]scryfallcards.Card, error)
- func (m *Manager) CopyDeck(d Deck, copyName string) (Deck, error)
- func (m *Manager) CreateDeck(name, deckType string) (*Deck, error)
- func (r Manager) FindBookmark(cardID string) (*Bookmark, error)
- func (r Manager) FindByName(name string) ([]scryfallcards.Card, error)
- func (r Manager) List() ([]Bookmark, error)
- func (m *Manager) ListBookmarked() ([]scryfallcards.Card, error)
- func (r Manager) ListByIds(ids []string) ([]scryfallcards.Card, error)
- func (r Manager) ListBySet(set string) ([]scryfallcards.Card, error)
- func (r Manager) ListDecks() ([]Deck, error)
- func (r Manager) ListSets() ([]scryfallset.Set, error)
- func (m *Manager) LoadCardImage(uri string) ([]byte, error)
- func (m *Manager) LoadDeck(id string) (Deck, error)
- func (r Manager) LoadPricing(cardID string) ([]CardPrice, error)
- func (m *Manager) LoadRulings(c *scryfallcards.Card) ([]rulings.Ruling, error)
- func (m *Manager) LoadSetIcon(uri string) ([]byte, error)
- func (m *Manager) LoadSymbolImage(uri string) ([]byte, error)
- func (m *Manager) ParseDeckDefinition(deckName, data string) (*decks.Deck, error)
- func (r Manager) RemoveBookmark(cardID string) error
- func (r Manager) RemoveCard(c DeckCard) error
- func (m *Manager) RemoveDeck(d Deck) error
- func (r Manager) Search(sr SearchRequest) ([]scryfallcards.Card, error)
- func (r Manager) SetCount() int64
- func (r Manager) Store(cs []scryfallcards.Card) error
- func (r Manager) StoreSets(sets []scryfallset.Set) error
- func (r Manager) UpdateCover(deckID, path string) error
- type SearchRequest
- type SetIconRepo
- type SetIconRepoImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBookmarkRepo ¶
Types ¶
type AssociationType ¶
type AssociationType int
const ( AssociationUnknown AssociationType = iota AssociationSideboard AssociationMain AssociationCommander AssociationCompanion )
type DeckCard ¶
type DeckCard struct { ID string Count int Card scryfallcards.Card CreatedAt time.Time AssociationType AssociationType }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles the file access for the application
func NewManager ¶
func NewManager(applicationDirectory string, client *goscryfall.Client) *Manager
func (Manager) AddBookmark ¶
func (*Manager) AddCardToDeck ¶
func (*Manager) CardSearch ¶
func (m *Manager) CardSearch(sr SearchRequest) ([]scryfallcards.Card, error)
func (Manager) FindBookmark ¶
func (Manager) FindByName ¶
func (r Manager) FindByName(name string) ([]scryfallcards.Card, error)
func (*Manager) ListBookmarked ¶
func (m *Manager) ListBookmarked() ([]scryfallcards.Card, error)
func (Manager) ListSets ¶
func (r Manager) ListSets() ([]scryfallset.Set, error)
func (Manager) LoadPricing ¶
func (*Manager) LoadRulings ¶
func (*Manager) ParseDeckDefinition ¶
func (Manager) RemoveBookmark ¶
func (Manager) RemoveCard ¶
func (*Manager) RemoveDeck ¶
func (Manager) Search ¶
func (r Manager) Search(sr SearchRequest) ([]scryfallcards.Card, error)
func (Manager) Store ¶
func (r Manager) Store(cs []scryfallcards.Card) error
func (Manager) StoreSets ¶
func (r Manager) StoreSets(sets []scryfallset.Set) error
func (Manager) UpdateCover ¶
type SearchRequest ¶
type SearchRequest struct { Name string TypeLine string OracleText string White bool Blue bool Black bool Red bool Green bool StandardLegal bool FutureLegal bool HistoricLegal bool GladiatorLegal bool PioneerLegal bool ExplorerLegal bool ModernLegal bool LegacyLegal bool PauperLegal bool VintageLegal bool PennyLegal bool CommanderLegal bool BrawlLegal bool HistoricBrawlLegal bool AlchemyLegal bool PauperCommanderLegal bool DuelLegal bool OldschoolLegal bool PremodernLegal bool }
func (SearchRequest) IsEmpty ¶
func (s SearchRequest) IsEmpty() bool
type SetIconRepo ¶
type SetIconRepo interface {
Image(code string) fyne.Resource
}
type SetIconRepoImpl ¶
type SetIconRepoImpl struct { }
Click to show internal directories.
Click to hide internal directories.