Documentation ¶
Index ¶
- type DBStore
- func (s *DBStore) Delete(ctx context.Context, id string) error
- func (s *DBStore) DeleteForSeekerConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
- func (s *DBStore) DeleteForUser(ctx context.Context, userID string) (*entity.SoughtGame, error)
- func (s *DBStore) ExistsForUser(ctx context.Context, userID string) (bool, error)
- func (s *DBStore) ExpireOld(ctx context.Context) error
- func (s *DBStore) Get(ctx context.Context, id string) (*entity.SoughtGame, error)
- func (s *DBStore) GetByReceiverConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
- func (s *DBStore) GetBySeekerConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
- func (s *DBStore) ListOpenSeeks(ctx context.Context, receiverID, tourneyID string) ([]*entity.SoughtGame, error)
- func (s *DBStore) Set(ctx context.Context, game *entity.SoughtGame) error
- func (s *DBStore) UpdateForReceiver(ctx context.Context, receiverID string) (*entity.SoughtGame, error)
- func (s *DBStore) UpdateForReceiverConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
- func (s *DBStore) UserMatchedBy(ctx context.Context, userID, matcher string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBStore ¶ added in v0.1.3
type DBStore struct {
// contains filtered or unexported fields
}
func (*DBStore) DeleteForSeekerConnID ¶ added in v0.1.3
func (s *DBStore) DeleteForSeekerConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
DeleteForSeekerConnID deletes the game by connection ID
func (*DBStore) DeleteForUser ¶ added in v0.1.3
DeleteForUser deletes the game by seeker ID
func (*DBStore) ExistsForUser ¶ added in v0.1.3
ExistsForUser returns true if the user already has an outstanding seek request.
func (*DBStore) ExpireOld ¶ added in v0.1.3
ExpireOld expires old seek requests. Usually this shouldn't be necessary unless something weird happens.
func (*DBStore) GetByReceiverConnID ¶ added in v0.1.3
func (s *DBStore) GetByReceiverConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
GetByReceiverConnID gets the sought game with the given socket connection ID for the receiver.
func (*DBStore) GetBySeekerConnID ¶ added in v0.1.3
GetBySeekerConnID gets the sought game with the given socket connection ID for the seeker.
func (*DBStore) ListOpenSeeks ¶ added in v0.1.3
func (s *DBStore) ListOpenSeeks(ctx context.Context, receiverID, tourneyID string) ([]*entity.SoughtGame, error)
ListOpenSeeks lists all open seek requests for receiverID, in tourneyID (optional)
func (*DBStore) UpdateForReceiver ¶ added in v0.1.3
func (s *DBStore) UpdateForReceiver(ctx context.Context, receiverID string) (*entity.SoughtGame, error)
UpdateForReceiver updates the receiver's status when the receiver leaves
func (*DBStore) UpdateForReceiverConnID ¶ added in v0.1.3
func (s *DBStore) UpdateForReceiverConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
DeleteForConnID modifies the game by connection ID