entity

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 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 CardArray

type CardArray struct {
	Pages []CardPage
}

CardArray Array of pages cards in same deck type

func NewCardArray

func NewCardArray() *CardArray

func (*CardArray) AddCard

func (cArr *CardArray) AddCard(gameID, collectionID string, cardID int64, count int)

type CardDescription

type CardDescription struct {
	GameID       string
	CollectionID string
	CardID       int64
	Count        int
}

CardDescription Full description for single card

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

func (*CardInfo) ImagePath

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

type CardPage

type CardPage []CardDescription

CardPage Image page for cards with max size 10x7

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

func (*CollectionInfo) ImagePath

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

func (*CollectionInfo) Path

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

type DeckArray

type DeckArray struct {
	Decks map[DeckType]*CardArray
	// contains filtered or unexported fields
}

DeckArray Full collection of different deck types split by pages

func NewDeckArray

func NewDeckArray() *DeckArray

func (*DeckArray) AddCard

func (dArr *DeckArray) AddCard(gameID, collectionID string, cardID int64, count int)

AddCard Allows you to add a card to the selected deck

func (*DeckArray) SelectDeck

func (dArr *DeckArray) SelectDeck(title, image string)

SelectDeck Allows you to select the type of deck to which cards will be added in the following calls to the AddCard() method

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

func (*DeckInfo) ImagePath

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

func (*DeckInfo) Path

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

type DeckType

type DeckType struct {
	DeckID string
	Image  string
}

DeckType Unique description for deck

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

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

func (*GameInfo) Path

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

type PageInfo

type PageInfo struct {
	Columns, Rows int
	Width, Height int
	Count         int
	Name          string
}

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