You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
698 B
Go
16 lines
698 B
Go
package session
|
|
|
|
import "context"
|
|
|
|
// Repository defines persistence behavior for game sessions.
|
|
type Repository interface {
|
|
EnsureSchema(ctx context.Context) error
|
|
CreateSession(ctx context.Context, session *GameSession) (*GameSession, error)
|
|
GetSessionByID(ctx context.Context, id string) (*GameSession, error)
|
|
GetActiveSessionByPlayerID(ctx context.Context, playerID string) (*GameSession, error)
|
|
UpdateSession(ctx context.Context, session *GameSession) (*GameSession, error)
|
|
CreateAttempt(ctx context.Context, attempt *SessionAttempt) error
|
|
CreateEvent(ctx context.Context, event *SessionEvent) error
|
|
ListQuestionIDsForSession(ctx context.Context, sessionID string) ([]string, error)
|
|
}
|