Documentation ¶
Index ¶
- Variables
- func NewMessageRepository(db *mongo.Database) message.Repository
- func NewMockRepository(existingChats []*chat.Chat) message.Repository
- type MockRepository
- func (repo MockRepository) Delete(chatID primitive.ObjectID, messageID primitive.ObjectID) error
- func (repo MockRepository) Insert(chatID primitive.ObjectID, msg *message.Message) (*message.Message, error)
- func (repo MockRepository) Update(chatID primitive.ObjectID, messageID primitive.ObjectID, fieldsToUpdate bson.M) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewMessageRepository ¶
func NewMessageRepository(db *mongo.Database) message.Repository
func NewMockRepository ¶
func NewMockRepository(existingChats []*chat.Chat) message.Repository
NewMockRepository takes the @existingChats to mock repo because we do not want to focus on creating a chat here in this mock-repository.
Types ¶
Click to show internal directories.
Click to hide internal directories.