Documentation ¶
Index ¶
- Variables
- func AnswerBytesToGameEvent(abts []byte) (*macondopb.GameEvent, error)
- type DBStore
- func (s *DBStore) CreateGenerationLog(ctx context.Context, req *puzzle_service.PuzzleGenerationJobRequest) (int, error)
- func (s *DBStore) CreatePuzzle(ctx context.Context, gameUUID string, turnNumber int32, ...) error
- func (s *DBStore) Disconnect()
- func (s *DBStore) GetAnswer(ctx context.Context, puzzleUUID string) (*macondopb.GameEvent, string, int32, string, *ipc.GameRequest, ...)
- func (s *DBStore) GetAttempts(ctx context.Context, userUUID string, puzzleUUID string) (bool, bool, int32, *bool, time.Time, time.Time, *entity.SingleRating, ...)
- func (s *DBStore) GetJobInfo(ctx context.Context, genId int) (time.Time, time.Time, time.Duration, *bool, *string, int, int, [][]int, error)
- func (s *DBStore) GetJobLogs(ctx context.Context, limit, offset int) ([]*puzzle_service.PuzzleJobLog, error)
- func (s *DBStore) GetNextClosestRatingPuzzleId(ctx context.Context, userId string, lexicon string, ...) (string, puzzle_service.PuzzleQueryResult, error)
- func (s *DBStore) GetNextPuzzleId(ctx context.Context, userUUID string, lexicon string) (string, puzzle_service.PuzzleQueryResult, error)
- func (s *DBStore) GetPotentialPuzzleGames(ctx context.Context, time1, time2 time.Time, limit int, lexicon string, ...) ([]pgtype.Text, error)
- func (s *DBStore) GetPreviousPuzzleId(ctx context.Context, userUUID string, puzzleUUID string) (string, error)
- func (s *DBStore) GetPuzzle(ctx context.Context, userUUID string, puzzleUUID string) (*macondopb.GameHistory, string, int32, *bool, time.Time, time.Time, ...)
- func (s *DBStore) GetStartPuzzleId(ctx context.Context, userUUID string, lexicon string, ...) (string, puzzle_service.PuzzleQueryResult, error)
- func (s *DBStore) GetUserRating(ctx context.Context, userID string, ratingKey entity.VariantKey) (*entity.SingleRating, error)
- func (s *DBStore) SetPuzzleVote(ctx context.Context, userID string, puzzleID string, vote int) error
- func (s *DBStore) SubmitAnswer(ctx context.Context, userUUID string, ratingKey entity.VariantKey, ...) error
- func (s *DBStore) UpdateGenerationLogStatus(ctx context.Context, id int, fulfilled bool, procErr error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var UnansweredCondition = " AND (correct IS NOT NULL)"
View Source
var UnratedCondition = " AND (correct IS NOT NULL OR attempts != 0)"
View Source
var UnseenCondition = ""
Functions ¶
Types ¶
type DBStore ¶
type DBStore struct {
// contains filtered or unexported fields
}
func (*DBStore) CreateGenerationLog ¶
func (s *DBStore) CreateGenerationLog(ctx context.Context, req *puzzle_service.PuzzleGenerationJobRequest) (int, error)
func (*DBStore) CreatePuzzle ¶
func (*DBStore) Disconnect ¶
func (s *DBStore) Disconnect()
func (*DBStore) GetAttempts ¶
func (*DBStore) GetJobInfo ¶
func (*DBStore) GetJobLogs ¶
func (s *DBStore) GetJobLogs(ctx context.Context, limit, offset int) ([]*puzzle_service.PuzzleJobLog, error)
func (*DBStore) GetNextClosestRatingPuzzleId ¶
func (s *DBStore) GetNextClosestRatingPuzzleId(ctx context.Context, userId string, lexicon string, ratingKey entity.VariantKey) (string, puzzle_service.PuzzleQueryResult, error)
func (*DBStore) GetNextPuzzleId ¶
func (s *DBStore) GetNextPuzzleId(ctx context.Context, userUUID string, lexicon string) (string, puzzle_service.PuzzleQueryResult, error)
func (*DBStore) GetPotentialPuzzleGames ¶
func (*DBStore) GetPreviousPuzzleId ¶
func (*DBStore) GetStartPuzzleId ¶
func (s *DBStore) GetStartPuzzleId(ctx context.Context, userUUID string, lexicon string, ratingKey entity.VariantKey) (string, puzzle_service.PuzzleQueryResult, error)
func (*DBStore) GetUserRating ¶
func (s *DBStore) GetUserRating(ctx context.Context, userID string, ratingKey entity.VariantKey) (*entity.SingleRating, error)
func (*DBStore) SetPuzzleVote ¶
func (*DBStore) SubmitAnswer ¶
func (s *DBStore) SubmitAnswer(ctx context.Context, userUUID string, ratingKey entity.VariantKey, newUserRating *entity.SingleRating, puzzleUUID string, newPuzzleRating *entity.SingleRating, userIsCorrect bool, showSolution bool) error
Click to show internal directories.
Click to hide internal directories.