repository

package
v0.0.0-...-8de5691 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

func (repo *MockRepository) Create(newChat chat.Chat) (*chat.Chat, error)

func (*MockRepository) Destroy

func (repo *MockRepository) Destroy(chatID primitive.ObjectID) error

func (*MockRepository) FindByID

func (repo *MockRepository) FindByID(staticID primitive.ObjectID) (*chat.Chat, error)

func (*MockRepository) FindChatOrSidesByStaticID

func (repo *MockRepository) FindChatOrSidesByStaticID(staticID primitive.ObjectID) (*chat.Chat, error)

func (*MockRepository) Where

func (repo *MockRepository) Where(filter bson.M) ([]chat.Chat, error)

Jump to

Keyboard shortcuts

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