Documentation
¶
Index ¶
- Variables
- type AuthRepository
- type GameRepository
- func (r *GameRepository) AddGuessForCurrentGame(currentUser *entity.User, word *entity.Word) (*entity.Game, error)
- func (r *GameRepository) CreateGame(word *entity.Word, currentUser *entity.User) (*entity.Game, error)
- func (r *GameRepository) FindCurrentGame(currentUser *entity.User) (*entity.Game, error)
- func (r *GameRepository) FindRandomWord() (*entity.Word, error)
- func (r *GameRepository) FindWord(word string) (*entity.Word, error)
- func (r *GameRepository) IsCurrentGameExists(currentUser *entity.User) (bool, error)
- func (r *GameRepository) SaveWords(words []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCurrentGameNotFound = errors.New("current game not found")
)
View Source
var ErrEmailUniqConstraint = errors.New("email already exists")
Functions ¶
This section is empty.
Types ¶
type AuthRepository ¶
type AuthRepository struct {
// contains filtered or unexported fields
}
func NewAuthRepository ¶
func NewAuthRepository(pgDb *bun.DB) *AuthRepository
type GameRepository ¶
type GameRepository struct {
// contains filtered or unexported fields
}
func NewGameRepository ¶
func NewGameRepository(pgDb *bun.DB) *GameRepository
func (*GameRepository) AddGuessForCurrentGame ¶
func (*GameRepository) CreateGame ¶
func (*GameRepository) FindCurrentGame ¶
func (*GameRepository) FindRandomWord ¶
func (r *GameRepository) FindRandomWord() (*entity.Word, error)
func (*GameRepository) FindWord ¶
func (r *GameRepository) FindWord(word string) (*entity.Word, error)
func (*GameRepository) IsCurrentGameExists ¶
func (r *GameRepository) IsCurrentGameExists(currentUser *entity.User) (bool, error)
func (*GameRepository) SaveWords ¶
func (r *GameRepository) SaveWords(words []string) error
Click to show internal directories.
Click to hide internal directories.