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) Disconnect()
- 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) New(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 ¶
type DBStore struct {
// contains filtered or unexported fields
}
func (*DBStore) DeleteForSeekerConnID ¶
func (s *DBStore) DeleteForSeekerConnID(ctx context.Context, connID string) (*entity.SoughtGame, error)
DeleteForSeekerConnID deletes the game by connection ID
func (*DBStore) DeleteForUser ¶
DeleteForUser deletes the game by seeker ID
func (*DBStore) Disconnect ¶
func (s *DBStore) Disconnect()
func (*DBStore) ExistsForUser ¶
ExistsForUser returns true if the user already has an outstanding seek request.
func (*DBStore) ExpireOld ¶
ExpireOld expires old seek requests. Usually this shouldn't be necessary unless something weird happens.
func (*DBStore) GetByReceiverConnID ¶
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 ¶
GetBySeekerConnID gets the sought game with the given socket connection ID for the seeker.
func (*DBStore) ListOpenSeeks ¶
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 ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.