Documentation
¶
Index ¶
- func GetFilter(filter model.GetMatchFilter) (bson.M, error)
- type MatchRepository
- func (mr MatchRepository) CancelMatch(cancelRequest model.CancelRequest) error
- func (qr MatchRepository) CreateMatch(match model.Match) (*mongo.InsertOneResult, error)
- func (mr MatchRepository) DeleteMatchWithUserId(id string) error
- func (qr MatchRepository) GetActiveMatchWithUserId(userId string) (model.Match, error)
- func (qr MatchRepository) GetMatch(id primitive.ObjectID) (model.Match, error)
- func (qr MatchRepository) GetMatchWithUserId(userId string) (model.Match, error)
- func (qr MatchRepository) GetPossibleMatchesForUser(userId string, filter model.GetMatchFilter) ([]model.Match, error)
- func (qr MatchRepository) UpdateMatch(questionId primitive.ObjectID, updateRequest model.UpdateMatchRequest) error
- func (mr MatchRepository) UpdateRoomCreated(req model.RoomCreatedReq) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MatchRepository ¶
type MatchRepository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(mongoClient *mongo.Client) MatchRepository
func (MatchRepository) CancelMatch ¶
func (mr MatchRepository) CancelMatch(cancelRequest model.CancelRequest) error
func (MatchRepository) CreateMatch ¶
func (qr MatchRepository) CreateMatch(match model.Match) (*mongo.InsertOneResult, error)
func (MatchRepository) DeleteMatchWithUserId ¶
func (mr MatchRepository) DeleteMatchWithUserId(id string) error
func (MatchRepository) GetActiveMatchWithUserId ¶
func (qr MatchRepository) GetActiveMatchWithUserId(userId string) (model.Match, error)
func (MatchRepository) GetMatchWithUserId ¶
func (qr MatchRepository) GetMatchWithUserId(userId string) (model.Match, error)
func (MatchRepository) GetPossibleMatchesForUser ¶
func (qr MatchRepository) GetPossibleMatchesForUser(userId string, filter model.GetMatchFilter) ([]model.Match, error)
func (MatchRepository) UpdateMatch ¶
func (qr MatchRepository) UpdateMatch(questionId primitive.ObjectID, updateRequest model.UpdateMatchRequest) error
func (MatchRepository) UpdateRoomCreated ¶
func (mr MatchRepository) UpdateRoomCreated(req model.RoomCreatedReq) error
Click to show internal directories.
Click to hide internal directories.