mocks

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMediaService

type MockMediaService struct {
	mock.Mock
}

MockMediaService is an autogenerated mock type for the MediaService type

func NewMockMediaService

func NewMockMediaService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMediaService

NewMockMediaService creates a new instance of MockMediaService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMediaService) Delete

func (_mock *MockMediaService) Delete(ctx context.Context, id int, principal kernel.Principal) error

Delete provides a mock function for the type MockMediaService

func (*MockMediaService) EXPECT

func (*MockMediaService) GetByID

func (_mock *MockMediaService) GetByID(ctx context.Context, id int) (*media.Media, error)

GetByID provides a mock function for the type MockMediaService

func (*MockMediaService) ListByCursor

func (_mock *MockMediaService) ListByCursor(ctx context.Context, userID int, limit int, beforeID int) ([]*media.Media, error)

ListByCursor provides a mock function for the type MockMediaService

func (*MockMediaService) ReencodeLibrary added in v1.1.3

func (_mock *MockMediaService) ReencodeLibrary(ctx context.Context) (media.ReencodeSummary, error)

ReencodeLibrary provides a mock function for the type MockMediaService

func (*MockMediaService) Upload

func (_mock *MockMediaService) Upload(ctx context.Context, req media.UploadRequest) (*media.Media, error)

Upload provides a mock function for the type MockMediaService

type MockMediaService_Delete_Call

type MockMediaService_Delete_Call struct {
	*mock.Call
}

MockMediaService_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*MockMediaService_Delete_Call) Return

func (*MockMediaService_Delete_Call) Run

func (*MockMediaService_Delete_Call) RunAndReturn

func (_c *MockMediaService_Delete_Call) RunAndReturn(run func(ctx context.Context, id int, principal kernel.Principal) error) *MockMediaService_Delete_Call

type MockMediaService_Expecter

type MockMediaService_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockMediaService_Expecter) Delete

func (_e *MockMediaService_Expecter) Delete(ctx any, id any, principal any) *MockMediaService_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • principal kernel.Principal

func (*MockMediaService_Expecter) GetByID

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockMediaService_Expecter) ListByCursor

func (_e *MockMediaService_Expecter) ListByCursor(ctx any, userID any, limit any, beforeID any) *MockMediaService_ListByCursor_Call

ListByCursor is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • limit int
  • beforeID int

func (*MockMediaService_Expecter) ReencodeLibrary added in v1.1.3

ReencodeLibrary is a helper method to define mock.On call

  • ctx context.Context

func (*MockMediaService_Expecter) Upload

Upload is a helper method to define mock.On call

  • ctx context.Context
  • req media.UploadRequest

type MockMediaService_GetByID_Call

type MockMediaService_GetByID_Call struct {
	*mock.Call
}

MockMediaService_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID'

func (*MockMediaService_GetByID_Call) Return

func (_c *MockMediaService_GetByID_Call) Return(media1 *media.Media, err error) *MockMediaService_GetByID_Call

func (*MockMediaService_GetByID_Call) Run

func (*MockMediaService_GetByID_Call) RunAndReturn

func (_c *MockMediaService_GetByID_Call) RunAndReturn(run func(ctx context.Context, id int) (*media.Media, error)) *MockMediaService_GetByID_Call

type MockMediaService_ListByCursor_Call

type MockMediaService_ListByCursor_Call struct {
	*mock.Call
}

MockMediaService_ListByCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByCursor'

func (*MockMediaService_ListByCursor_Call) Return

func (_c *MockMediaService_ListByCursor_Call) Return(medias []*media.Media, err error) *MockMediaService_ListByCursor_Call

func (*MockMediaService_ListByCursor_Call) Run

func (_c *MockMediaService_ListByCursor_Call) Run(run func(ctx context.Context, userID int, limit int, beforeID int)) *MockMediaService_ListByCursor_Call

func (*MockMediaService_ListByCursor_Call) RunAndReturn

func (_c *MockMediaService_ListByCursor_Call) RunAndReturn(run func(ctx context.Context, userID int, limit int, beforeID int) ([]*media.Media, error)) *MockMediaService_ListByCursor_Call

type MockMediaService_ReencodeLibrary_Call added in v1.1.3

type MockMediaService_ReencodeLibrary_Call struct {
	*mock.Call
}

MockMediaService_ReencodeLibrary_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReencodeLibrary'

func (*MockMediaService_ReencodeLibrary_Call) Return added in v1.1.3

func (_c *MockMediaService_ReencodeLibrary_Call) Return(reencodeSummary media.ReencodeSummary, err error) *MockMediaService_ReencodeLibrary_Call

func (*MockMediaService_ReencodeLibrary_Call) Run added in v1.1.3

func (*MockMediaService_ReencodeLibrary_Call) RunAndReturn added in v1.1.3

func (_c *MockMediaService_ReencodeLibrary_Call) RunAndReturn(run func(ctx context.Context) (media.ReencodeSummary, error)) *MockMediaService_ReencodeLibrary_Call

type MockMediaService_Upload_Call

type MockMediaService_Upload_Call struct {
	*mock.Call
}

MockMediaService_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload'

func (*MockMediaService_Upload_Call) Return

func (_c *MockMediaService_Upload_Call) Return(media1 *media.Media, err error) *MockMediaService_Upload_Call

func (*MockMediaService_Upload_Call) Run

func (_c *MockMediaService_Upload_Call) Run(run func(ctx context.Context, req media.UploadRequest)) *MockMediaService_Upload_Call

func (*MockMediaService_Upload_Call) RunAndReturn

func (_c *MockMediaService_Upload_Call) RunAndReturn(run func(ctx context.Context, req media.UploadRequest) (*media.Media, error)) *MockMediaService_Upload_Call

type MockRoleCapabilities

type MockRoleCapabilities struct {
	mock.Mock
}

MockRoleCapabilities is an autogenerated mock type for the RoleCapabilities type

func NewMockRoleCapabilities

func NewMockRoleCapabilities(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRoleCapabilities

NewMockRoleCapabilities creates a new instance of MockRoleCapabilities. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockRoleCapabilities) CanMedia

func (_mock *MockRoleCapabilities) CanMedia(name string) bool

CanMedia provides a mock function for the type MockRoleCapabilities

func (*MockRoleCapabilities) EXPECT

type MockRoleCapabilities_CanMedia_Call

type MockRoleCapabilities_CanMedia_Call struct {
	*mock.Call
}

MockRoleCapabilities_CanMedia_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanMedia'

func (*MockRoleCapabilities_CanMedia_Call) Return

func (*MockRoleCapabilities_CanMedia_Call) Run

func (*MockRoleCapabilities_CanMedia_Call) RunAndReturn

type MockRoleCapabilities_Expecter

type MockRoleCapabilities_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockRoleCapabilities_Expecter) CanMedia

CanMedia is a helper method to define mock.On call

  • name string

Jump to

Keyboard shortcuts

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