service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackSideInformation added in v0.2.2

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

type CardService

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

func NewCardService

func NewCardService(cfg *config.Config, cardRepository repository.ICardRepository) *CardService

func (*CardService) Create

func (s *CardService) Create(gameID, collectionID, deckID string, dtoObject *dto.CreateCardDTO) (*entity.CardInfo, error)

func (*CardService) Delete

func (s *CardService) Delete(gameID, collectionID, deckID string, cardID int64) error

func (*CardService) GetImage

func (s *CardService) GetImage(gameID, collectionID, deckID string, cardID int64) ([]byte, string, error)

func (*CardService) Item

func (s *CardService) Item(gameID, collectionID, deckID string, cardID int64) (*entity.CardInfo, error)

func (*CardService) List

func (s *CardService) List(gameID, collectionID, deckID, sortField, search string) ([]*entity.CardInfo, *network.Meta, error)

func (*CardService) Update

func (s *CardService) Update(gameID, collectionID, deckID string, cardID int64, dtoObject *dto.UpdateCardDTO) (*entity.CardInfo, error)

type CollectionService

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

func NewCollectionService

func NewCollectionService(cfg *config.Config, collectionRepository repository.ICollectionRepository) *CollectionService

func (*CollectionService) Create

func (s *CollectionService) Create(gameID string, dtoObject *dto.CreateCollectionDTO) (*entity.CollectionInfo, error)

func (*CollectionService) Delete

func (s *CollectionService) Delete(gameID, collectionID string) error

func (*CollectionService) GetImage

func (s *CollectionService) GetImage(gameID, collectionID string) ([]byte, string, error)

func (*CollectionService) Item

func (s *CollectionService) Item(gameID, collectionID string) (*entity.CollectionInfo, error)

func (*CollectionService) List

func (s *CollectionService) List(gameID, sortField, search string) ([]*entity.CollectionInfo, *network.Meta, error)

func (*CollectionService) Update

func (s *CollectionService) Update(gameID, collectionID string, dtoObject *dto.UpdateCollectionDTO) (*entity.CollectionInfo, error)

type DeckInformation added in v0.2.2

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

type DeckService

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

func NewDeckService

func NewDeckService(cfg *config.Config, deckRepository repository.IDeckRepository) *DeckService

func (*DeckService) Create

func (s *DeckService) Create(gameID, collectionID string, dtoObject *dto.CreateDeckDTO) (*entity.DeckInfo, error)

func (*DeckService) Delete

func (s *DeckService) Delete(gameID, collectionID, deckID string) error

func (*DeckService) GetImage

func (s *DeckService) GetImage(gameID, collectionID, deckID string) ([]byte, string, error)

func (*DeckService) Item

func (s *DeckService) Item(gameID, collectionID, deckID string) (*entity.DeckInfo, error)

func (*DeckService) List

func (s *DeckService) List(gameID, collectionID, sortField, search string) ([]*entity.DeckInfo, *network.Meta, error)

func (*DeckService) ListAllUnique

func (s *DeckService) ListAllUnique(gameID string) ([]*entity.DeckInfo, error)

func (*DeckService) Update

func (s *DeckService) Update(gameID, collectionID, deckID string, dtoObject *dto.UpdateDeckDTO) (*entity.DeckInfo, error)

type GameService

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

func NewGameService

func NewGameService(cfg *config.Config, gameRepository repository.IGameRepository) *GameService

func (*GameService) Create

func (s *GameService) Create(dtoObject *dto.CreateGameDTO) (*entity.GameInfo, error)

func (*GameService) Delete

func (s *GameService) Delete(gameID string) error

func (*GameService) Duplicate

func (s *GameService) Duplicate(gameID string, dtoObject *dto.DuplicateGameDTO) (*entity.GameInfo, error)

func (*GameService) Export

func (s *GameService) Export(gameID string) ([]byte, error)

func (*GameService) GetImage

func (s *GameService) GetImage(gameID string) ([]byte, string, error)

func (*GameService) Import

func (s *GameService) Import(data []byte, name string) (*entity.GameInfo, error)

func (*GameService) Item

func (s *GameService) Item(gameID string) (*entity.GameInfo, error)

func (*GameService) List

func (s *GameService) List(sortField, search string) ([]*entity.GameInfo, *network.Meta, error)

func (*GameService) Update

func (s *GameService) Update(gameID string, dtoObject *dto.UpdateGameDTO) (*entity.GameInfo, error)

type GeneratorService

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

func NewGeneratorService

func NewGeneratorService(cfg *config.Config, gameService IGameService, collectionService ICollectionService, deckService IDeckService, cardService ICardService) *GeneratorService

func (*GeneratorService) GenerateGame

func (s *GeneratorService) GenerateGame(gameID string, dtoObject *dto.GenerateGameDTO) error

type ICardService

type ICardService interface {
	Create(gameID, collectionID, deckID string, dtoObject *dto.CreateCardDTO) (*entity.CardInfo, error)
	Item(gameID, collectionID, deckID string, cardID int64) (*entity.CardInfo, error)
	List(gameID, collectionID, deckID, sortField, search string) ([]*entity.CardInfo, *network.Meta, error)
	Update(gameID, collectionID, deckID string, cardID int64, dtoObject *dto.UpdateCardDTO) (*entity.CardInfo, error)
	Delete(gameID, collectionID, deckID string, cardID int64) error
	GetImage(gameID, collectionID, deckID string, cardID int64) ([]byte, string, error)
}

type ICollectionService

type ICollectionService interface {
	Create(gameID string, dtoObject *dto.CreateCollectionDTO) (*entity.CollectionInfo, error)
	Item(gameID, collectionID string) (*entity.CollectionInfo, error)
	List(gameID, sortField, search string) ([]*entity.CollectionInfo, *network.Meta, error)
	Update(gameID, collectionID string, dtoObject *dto.UpdateCollectionDTO) (*entity.CollectionInfo, error)
	Delete(gameID, collectionID string) error
	GetImage(gameID, collectionID string) ([]byte, string, error)
}

type IDeckService

type IDeckService interface {
	Create(gameID, collectionID string, dtoObject *dto.CreateDeckDTO) (*entity.DeckInfo, error)
	Item(gameID, collectionID, deckID string) (*entity.DeckInfo, error)
	List(gameID, collectionID, sortField, search string) ([]*entity.DeckInfo, *network.Meta, error)
	Update(gameID, collectionID, deckID string, dtoObject *dto.UpdateDeckDTO) (*entity.DeckInfo, error)
	Delete(gameID, collectionID, deckID string) error
	GetImage(gameID, collectionID, deckID string) ([]byte, string, error)
	ListAllUnique(gameID string) ([]*entity.DeckInfo, error)
}

type IGameService

type IGameService interface {
	Create(dtoObject *dto.CreateGameDTO) (*entity.GameInfo, error)
	Item(gameID string) (*entity.GameInfo, error)
	List(sortField, search string) ([]*entity.GameInfo, *network.Meta, error)
	Update(gameID string, dtoObject *dto.UpdateGameDTO) (*entity.GameInfo, error)
	Delete(gameID string) error
	GetImage(gameID string) ([]byte, string, error)
	Duplicate(gameID string, dtoObject *dto.DuplicateGameDTO) (*entity.GameInfo, error)
	Export(gameID string) ([]byte, error)
	Import(data []byte, name string) (*entity.GameInfo, error)
}

type IGeneratorService

type IGeneratorService interface {
	GenerateGame(gameID string, dtoObject *dto.GenerateGameDTO) error
}

type ISystemService added in v0.1.0

type ISystemService interface {
	Quit()
	GetSettings() (*entity.SettingInfo, error)
	UpdateSettings(dtoObject *dto.UpdateSettingsDTO) (*entity.SettingInfo, error)
}

type PageInformation added in v0.2.2

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

type SystemService added in v0.1.0

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

func NewService added in v0.1.0

func NewService(cfg *config.Config, db *db.DB) *SystemService

func (*SystemService) GetSettings added in v0.1.0

func (s *SystemService) GetSettings() (*entity.SettingInfo, error)

func (*SystemService) Quit added in v0.1.0

func (s *SystemService) Quit()

func (*SystemService) UpdateSettings added in v0.1.0

func (s *SystemService) UpdateSettings(dtoObject *dto.UpdateSettingsDTO) (*entity.SettingInfo, error)

Jump to

Keyboard shortcuts

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