Documentation ¶
Index ¶
- Variables
- func NewMockRepository() chat.Repository
- func NewRepository(db *mongo.Database) chat.Repository
- type MockRepository
- func (repo *MockRepository) Create(newChat chat.Chat) (*chat.Chat, error)
- func (repo *MockRepository) Destroy(chatID primitive.ObjectID) error
- func (repo *MockRepository) FindByID(staticID primitive.ObjectID) (*chat.Chat, error)
- func (repo *MockRepository) FindChatOrSidesByStaticID(staticID primitive.ObjectID) (*chat.Chat, error)
- func (repo *MockRepository) Where(filter bson.M) ([]chat.Chat, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrChatNotFound = errors.New("chat not found") ErrChatAlreadyExists = errors.New("chat already exists") )
Functions ¶
func NewMockRepository ¶
func NewMockRepository() chat.Repository
func NewRepository ¶
func NewRepository(db *mongo.Database) chat.Repository
Types ¶
type MockRepository ¶
type MockRepository struct {
// contains filtered or unexported fields
}
func (*MockRepository) Destroy ¶
func (repo *MockRepository) Destroy(chatID primitive.ObjectID) error
func (*MockRepository) FindChatOrSidesByStaticID ¶
Click to show internal directories.
Click to hide internal directories.