services

package
v0.0.0-...-3040c09 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeckRepo

type DeckRepo interface {
	CreateDeck(ctx context.Context, deck *entities.Deck) (*entities.Deck, error)
	ReadDeck(ctx context.Context, id uuid.UUID) (*entities.Deck, error)
	DrawDeckCard(ctx context.Context, id uuid.UUID, count int64) ([]*entities.Card, error)
}

type DeckService

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

func NewDeckService

func NewDeckService(repo DeckRepo, log *log.Logger) (*DeckService, error)

func (*DeckService) CreateDeck

func (s *DeckService) CreateDeck(ctx context.Context, shuffled bool, cards []string) (*deck.CreateDeckResponse, error)

func (*DeckService) DrawCard

func (s *DeckService) DrawCard(ctx context.Context, id string, count int64) (*deck.DrawCardResponse, error)

func (*DeckService) OpenDeck

func (s *DeckService) OpenDeck(ctx context.Context, id string) (*deck.OpenDeckResponse, error)

Jump to

Keyboard shortcuts

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