service

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 string) ([]*entity.CardInfo, 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 string) ([]*entity.CollectionInfo, error)

func (*CollectionService) Update

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

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 string) ([]*entity.DeckInfo, 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 string) ([]*entity.GameInfo, 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 string) ([]*entity.CardInfo, 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 string) ([]*entity.CollectionInfo, 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 string) ([]*entity.DeckInfo, 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 string) ([]*entity.GameInfo, 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
}

Jump to

Keyboard shortcuts

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