entity

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CardInfo

type CardInfo struct {
	ID          int64             `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Image       string            `json:"image"`
	CachedImage string            `json:"cachedImage,omitempty"`
	Variables   map[string]string `json:"variables"`
	Count       int               `json:"count"`
	CreatedAt   *time.Time        `json:"createdAt"`
	UpdatedAt   *time.Time        `json:"updatedAt"`
}

func (*CardInfo) FillCachedImage

func (i *CardInfo) FillCachedImage(cfg *config.Config, gameID, collectionID, deckID string)

func (*CardInfo) GetCreatedAt

func (i *CardInfo) GetCreatedAt() time.Time

func (*CardInfo) GetName

func (i *CardInfo) GetName() string

type CollectionInfo

type CollectionInfo struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Image       string     `json:"image"`
	CachedImage string     `json:"cachedImage,omitempty"`
	CreatedAt   *time.Time `json:"createdAt"`
	UpdatedAt   *time.Time `json:"updatedAt"`
}

func (*CollectionInfo) FillCachedImage

func (i *CollectionInfo) FillCachedImage(cfg *config.Config, gameID string)

func (*CollectionInfo) GetCreatedAt

func (i *CollectionInfo) GetCreatedAt() time.Time

func (*CollectionInfo) GetName

func (i *CollectionInfo) GetName() string

type DeckInfo

type DeckInfo struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Image       string     `json:"image"`
	CachedImage string     `json:"cachedImage,omitempty"`
	CreatedAt   *time.Time `json:"createdAt"`
	UpdatedAt   *time.Time `json:"updatedAt"`
}

func (*DeckInfo) FillCachedImage

func (i *DeckInfo) FillCachedImage(cfg *config.Config, gameID, collectionID string)

func (*DeckInfo) GetCreatedAt

func (i *DeckInfo) GetCreatedAt() time.Time

func (*DeckInfo) GetName

func (i *DeckInfo) GetName() string

type GameInfo

type GameInfo struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Image       string     `json:"image"`
	CachedImage string     `json:"cachedImage,omitempty"`
	CreatedAt   *time.Time `json:"createdAt"`
	UpdatedAt   *time.Time `json:"updatedAt"`
}

func (*GameInfo) FillCachedImage

func (i *GameInfo) FillCachedImage(cfg *config.Config)

func (*GameInfo) GetCreatedAt

func (i *GameInfo) GetCreatedAt() time.Time

func (*GameInfo) GetName

func (i *GameInfo) GetName() string

func (*GameInfo) Path

func (i *GameInfo) Path(cfg *config.Config) string

type RecursiveCardItem added in v0.2.3

type RecursiveCardItem struct {
	GameID       string `json:"gameId"`
	CollectionID string `json:"collectionId"`
	DeckID       string `json:"deckId"`
	CardID       int64  `json:"cardId"`
}

type RecursiveCollectionItem added in v0.2.3

type RecursiveCollectionItem struct {
	GameID       string `json:"gameId"`
	CollectionID string `json:"collectionId"`
}

type RecursiveDeckItem added in v0.2.3

type RecursiveDeckItem struct {
	GameID       string `json:"gameId"`
	CollectionID string `json:"collectionId"`
	DeckID       string `json:"deckId"`
}

type RecursiveSearchItems added in v0.2.3

type RecursiveSearchItems struct {
	Games       []string                  `json:"games,omitempty"`
	Collections []RecursiveCollectionItem `json:"collections,omitempty"`
	Decks       []RecursiveDeckItem       `json:"decks,omitempty"`
	Cards       []RecursiveCardItem       `json:"cards,omitempty"`
}

type SettingInfo

type SettingInfo struct {
	Lang string `json:"lang"`
}

func NewSettings

func NewSettings() *SettingInfo

type Status

type Status struct {
	Type     string  `json:"type"`
	Message  string  `json:"message"`
	Progress float32 `json:"progress"`
	Status   string  `json:"status"`
}

Jump to

Keyboard shortcuts

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