repository

package
v0.0.0-...-68650f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilter

func GetFilter(filter model.GetMatchFilter) (bson.M, error)

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) GetMatch

func (qr MatchRepository) GetMatch(id primitive.ObjectID) (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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL