card

package
v0.0.0-...-20a34b2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Id         string    `json:"id"`
	DeckHolder string    `json:"deck_holder"`
	Owner      string    `json:"owner"`
	Question   string    `json:"question"`
	Answer     string    `json:"answer"`
	Created_at time.Time `json:"created_at"`
}

Card Entity

func NewDeck

func NewDeck(deckHolder string, owner string, question string, answer string) *Card

type Repository

type Repository interface {
	Store(*Card) error
	GetAllCards(userID string) ([]Card, error)
	Delete(cardID string) error
	TradeCard(card, cardOwner, cardReceiver string) error
}

type Usecase

type Usecase interface {
	Store(*Card) error
	Get(userID string) ([]Card, error)
	Delete(cardID string) error
	TradeCard(card, cardOwner, cardReceiver string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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