db

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewFSEntryDB

func NewFSEntryDB(db fsentry.IFSEntry) *DB

func (*DB) CardCreate

func (s *DB) CardCreate(ctx context.Context, gameID, collectionID, deckID, name, description, image string, variables map[string]string, count int) (*entity.CardInfo, error)

func (*DB) CardDelete

func (s *DB) CardDelete(ctx context.Context, gameID, collectionID, deckID string, cardID int64) error

func (*DB) CardGet

func (s *DB) CardGet(ctx context.Context, gameID, collectionID, deckID string, cardID int64) (context.Context, *entity.CardInfo, error)

func (*DB) CardImageCreate added in v0.1.0

func (s *DB) CardImageCreate(ctx context.Context, gameID, collectionID, deckID string, cardID int64, data []byte) error

func (*DB) CardImageDelete added in v0.1.0

func (s *DB) CardImageDelete(ctx context.Context, gameID, collectionID, deckID string, cardID int64) error

func (*DB) CardImageGet added in v0.1.0

func (s *DB) CardImageGet(ctx context.Context, gameID, collectionID, deckID string, cardID int64) ([]byte, error)

func (*DB) CardList

func (s *DB) CardList(ctx context.Context, gameID, collectionID, deckID string) ([]*entity.CardInfo, error)

func (*DB) CardUpdate

func (s *DB) CardUpdate(ctx context.Context, gameID, collectionID, deckID string, cardID int64, name, description, image string, variables map[string]string, count int) (*entity.CardInfo, error)

func (*DB) CollectionCreate

func (s *DB) CollectionCreate(ctx context.Context, gameID, name, description, image string) (*entity.CollectionInfo, error)

func (*DB) CollectionDelete

func (s *DB) CollectionDelete(ctx context.Context, gameID, name string) error

func (*DB) CollectionGet

func (s *DB) CollectionGet(ctx context.Context, gameID, name string) (context.Context, *entity.CollectionInfo, error)

func (*DB) CollectionImageCreate added in v0.1.0

func (s *DB) CollectionImageCreate(ctx context.Context, gameID, collectionID string, data []byte) error

func (*DB) CollectionImageDelete added in v0.1.0

func (s *DB) CollectionImageDelete(ctx context.Context, gameID, collectionID string) error

func (*DB) CollectionImageGet added in v0.1.0

func (s *DB) CollectionImageGet(ctx context.Context, gameID, collectionID string) ([]byte, error)

func (*DB) CollectionList

func (s *DB) CollectionList(ctx context.Context, gameID string) ([]*entity.CollectionInfo, error)

func (*DB) CollectionMove

func (s *DB) CollectionMove(ctx context.Context, gameID, oldName, newName string) (*entity.CollectionInfo, error)

func (*DB) CollectionUpdate

func (s *DB) CollectionUpdate(ctx context.Context, gameID, name, description, image string) (*entity.CollectionInfo, error)

func (*DB) DeckCreate

func (s *DB) DeckCreate(ctx context.Context, gameID, collectionID, name, description, image string) (*entity.DeckInfo, error)

func (*DB) DeckDelete

func (s *DB) DeckDelete(ctx context.Context, gameID, collectionID, name string) error

func (*DB) DeckGet

func (s *DB) DeckGet(ctx context.Context, gameID, collectionID, name string) (context.Context, *entity.DeckInfo, error)

func (*DB) DeckImageCreate added in v0.1.0

func (s *DB) DeckImageCreate(ctx context.Context, gameID, collectionID, deckID string, data []byte) error

func (*DB) DeckImageDelete added in v0.1.0

func (s *DB) DeckImageDelete(ctx context.Context, gameID, collectionID, deckID string) error

func (*DB) DeckImageGet added in v0.1.0

func (s *DB) DeckImageGet(ctx context.Context, gameID, collectionID, deckID string) ([]byte, error)

func (*DB) DeckList

func (s *DB) DeckList(ctx context.Context, gameID, collectionID string) ([]*entity.DeckInfo, error)

func (*DB) DeckMove

func (s *DB) DeckMove(ctx context.Context, gameID, collectionID, oldName, newName string) (*entity.DeckInfo, error)

func (*DB) DeckUpdate

func (s *DB) DeckUpdate(ctx context.Context, gameID, collectionID, name, description, image string) (*entity.DeckInfo, error)

func (*DB) Drop

func (s *DB) Drop() error

func (*DB) GameCreate

func (s *DB) GameCreate(_ context.Context, name, description, image string) (*entity.GameInfo, error)

func (*DB) GameDelete

func (s *DB) GameDelete(_ context.Context, name string) error

func (*DB) GameDuplicate

func (s *DB) GameDuplicate(_ context.Context, srcName, dstName string) (*entity.GameInfo, error)

func (*DB) GameGet

func (s *DB) GameGet(ctx context.Context, name string) (context.Context, *entity.GameInfo, error)

func (*DB) GameImageCreate added in v0.1.0

func (s *DB) GameImageCreate(ctx context.Context, gameID string, data []byte) error

func (*DB) GameImageDelete added in v0.1.0

func (s *DB) GameImageDelete(ctx context.Context, gameID string) error

func (*DB) GameImageGet added in v0.1.0

func (s *DB) GameImageGet(ctx context.Context, gameID string) ([]byte, error)

func (*DB) GameList

func (s *DB) GameList(ctx context.Context) ([]*entity.GameInfo, error)

func (*DB) GameMove

func (s *DB) GameMove(_ context.Context, oldName, newName string) (*entity.GameInfo, error)

func (*DB) GameUpdate

func (s *DB) GameUpdate(_ context.Context, name, description, image string) (*entity.GameInfo, error)

func (*DB) GameUpdateInfo

func (s *DB) GameUpdateInfo(_ context.Context, name, newName string) error

func (*DB) Init

func (s *DB) Init() error

func (*DB) SettingsGet added in v0.1.0

func (s *DB) SettingsGet() (*entity.SettingInfo, error)

func (*DB) SettingsSet added in v0.1.0

func (s *DB) SettingsSet(data *entity.SettingInfo) error

Jump to

Keyboard shortcuts

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