mocks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCalendarRepository added in v0.1.0

type MockCalendarRepository struct {
	mock.Mock
}

MockCalendarRepository is a testify mock for calendar repository. It also contains a lightweight in-memory store used as a fallback when tests don't set explicit expectations (so existing tests keep working).

func (*MockCalendarRepository) Create added in v0.1.0

func (m *MockCalendarRepository) Create(ctx *gin.Context, calendar *models.Calendar) (*models.Calendar, error)

Create adds a new calendar

func (*MockCalendarRepository) CreateWithContext added in v0.1.0

func (m *MockCalendarRepository) CreateWithContext(ctx context.Context, calendar *models.Calendar) (*models.Calendar, error)

CreateWithContext adds a new calendar using context.Context

func (*MockCalendarRepository) Delete added in v0.1.0

Delete removes a calendar by its ID

func (*MockCalendarRepository) GetAll added in v0.1.0

func (m *MockCalendarRepository) GetAll(ctx *gin.Context, userID primitive.ObjectID, page int64, size int64) ([]*models.Calendar, int64, error)

GetAll retrieves all calendars for a user with pagination

func (*MockCalendarRepository) GetByID added in v0.1.0

GetByID retrieves a calendar by its ID

func (*MockCalendarRepository) GetByName added in v0.1.0

func (m *MockCalendarRepository) GetByName(ctx *gin.Context, userID primitive.ObjectID, name *string) (*models.Calendar, error)

GetByName retrieves a calendar by its name for a specific user

func (*MockCalendarRepository) GetByNameWithContext added in v0.1.0

func (m *MockCalendarRepository) GetByNameWithContext(ctx context.Context, userID primitive.ObjectID, name *string) (*models.Calendar, error)

GetByNameWithContext retrieves a calendar by its name for a specific user using context.Context

func (*MockCalendarRepository) GetSince added in v0.1.0

func (m *MockCalendarRepository) GetSince(ctx *gin.Context, userID primitive.ObjectID, since time.Time, page int64, size int64) ([]*models.Calendar, int64, error)

GetSince retrieves calendars for a user updated since a specific time with pagination

func (*MockCalendarRepository) Update added in v0.1.0

Update modifies an existing calendar

type MockFolderRepository

type MockFolderRepository struct {
	mock.Mock
}

MockFolderRepository provides a mock implementation of FolderRepositoryInterface

func (*MockFolderRepository) Create

func (m *MockFolderRepository) Create(ctx context.Context, folder *models.Folder) (*models.Folder, error)

Create creates a new folder

func (*MockFolderRepository) Delete

Delete removes a folder

func (*MockFolderRepository) DeleteByUserID

func (m *MockFolderRepository) DeleteByUserID(ctx context.Context, userID primitive.ObjectID) error

DeleteByUserID deletes all folders for a specific user

func (*MockFolderRepository) GetAll

GetAll retrieves all folders for a user

func (*MockFolderRepository) Update

Update modifies an existing folder

type MockTagRepository

type MockTagRepository struct {
	mock.Mock
}

MockTagRepository provides a mock implementation of TagRepository

func (*MockTagRepository) Create

func (m *MockTagRepository) Create(ctx context.Context, tag *models.Tag) (*models.Tag, error)

Create creates a new tag

func (*MockTagRepository) Delete

Delete deletes a tag by ID

func (*MockTagRepository) DeleteByUserID

func (m *MockTagRepository) DeleteByUserID(ctx context.Context, userID primitive.ObjectID) error

DeleteByUserID deletes all tags for a specific user

func (*MockTagRepository) GetAll

func (m *MockTagRepository) GetAll(ctx context.Context, userID *primitive.ObjectID) ([]*models.Tag, error)

GetAll gets all tags

func (*MockTagRepository) GetByID

GetByID gets a tag by ID

func (*MockTagRepository) Update

func (m *MockTagRepository) Update(ctx context.Context, tag *models.Tag) (*models.Tag, error)

Update updates a tag with the given ID

type MockUserClient

type MockUserClient struct {
	mock.Mock
}

MockUserClient provides a mock implementation of UserClient

func (*MockUserClient) GetUserDevices

GetUserDevices gets the devices for a user

func (*MockUserClient) GetUserPublicKey

GetUserPublicKey gets the public key for a user

Jump to

Keyboard shortcuts

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