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 MockMediaServiceInterface

type MockMediaServiceInterface struct {
	mock.Mock
}

MockMediaServiceInterface is an autogenerated mock type for the MediaServiceInterface type

func NewMockMediaServiceInterface

func NewMockMediaServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMediaServiceInterface

NewMockMediaServiceInterface creates a new instance of MockMediaServiceInterface. 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 (*MockMediaServiceInterface) Count

func (_mock *MockMediaServiceInterface) Count(ctx context.Context, principal kernel.Principal, search string, dateFilter string) (int, error)

Count provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) Delete

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

Delete provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) EXPECT

func (*MockMediaServiceInterface) ForceUpload

func (_mock *MockMediaServiceInterface) ForceUpload(ctx context.Context, req media.UploadRequest) (*media.Media, error)

ForceUpload provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) GenerateFromBytes

func (_mock *MockMediaServiceInterface) GenerateFromBytes(ctx context.Context, imageBytes []byte, principal kernel.Principal, altText string, originalFilename string) (*media.Media, error)

GenerateFromBytes provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) GetByID

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

GetByID provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) SearchMediaByCursor

func (_mock *MockMediaServiceInterface) SearchMediaByCursor(ctx context.Context, principal kernel.Principal, search string, dateFilter string, limit int, beforeID int) ([]*media.Media, error)

SearchMediaByCursor provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) Upload

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

Upload provides a mock function for the type MockMediaServiceInterface

type MockMediaServiceInterface_Count_Call

type MockMediaServiceInterface_Count_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_Count_Call) Return

func (*MockMediaServiceInterface_Count_Call) Run

func (*MockMediaServiceInterface_Count_Call) RunAndReturn

func (_c *MockMediaServiceInterface_Count_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, search string, dateFilter string) (int, error)) *MockMediaServiceInterface_Count_Call

type MockMediaServiceInterface_Delete_Call

type MockMediaServiceInterface_Delete_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_Delete_Call) Return

func (*MockMediaServiceInterface_Delete_Call) Run

func (*MockMediaServiceInterface_Delete_Call) RunAndReturn

type MockMediaServiceInterface_Expecter

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

func (*MockMediaServiceInterface_Expecter) Count

func (_e *MockMediaServiceInterface_Expecter) Count(ctx any, principal any, search any, dateFilter any) *MockMediaServiceInterface_Count_Call

Count is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal
  • search string
  • dateFilter string

func (*MockMediaServiceInterface_Expecter) Delete

Delete is a helper method to define mock.On call

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

func (*MockMediaServiceInterface_Expecter) ForceUpload

ForceUpload is a helper method to define mock.On call

  • ctx context.Context
  • req media.UploadRequest

func (*MockMediaServiceInterface_Expecter) GenerateFromBytes

func (_e *MockMediaServiceInterface_Expecter) GenerateFromBytes(ctx any, imageBytes any, principal any, altText any, originalFilename any) *MockMediaServiceInterface_GenerateFromBytes_Call

GenerateFromBytes is a helper method to define mock.On call

  • ctx context.Context
  • imageBytes []byte
  • principal kernel.Principal
  • altText string
  • originalFilename string

func (*MockMediaServiceInterface_Expecter) GetByID

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockMediaServiceInterface_Expecter) SearchMediaByCursor

func (_e *MockMediaServiceInterface_Expecter) SearchMediaByCursor(ctx any, principal any, search any, dateFilter any, limit any, beforeID any) *MockMediaServiceInterface_SearchMediaByCursor_Call

SearchMediaByCursor is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal
  • search string
  • dateFilter string
  • limit int
  • beforeID int

func (*MockMediaServiceInterface_Expecter) Upload

Upload is a helper method to define mock.On call

  • ctx context.Context
  • req media.UploadRequest

type MockMediaServiceInterface_ForceUpload_Call

type MockMediaServiceInterface_ForceUpload_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_ForceUpload_Call) Return

func (*MockMediaServiceInterface_ForceUpload_Call) Run

func (*MockMediaServiceInterface_ForceUpload_Call) RunAndReturn

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

type MockMediaServiceInterface_GenerateFromBytes_Call

type MockMediaServiceInterface_GenerateFromBytes_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_GenerateFromBytes_Call) Return

func (*MockMediaServiceInterface_GenerateFromBytes_Call) Run

func (*MockMediaServiceInterface_GenerateFromBytes_Call) RunAndReturn

func (_c *MockMediaServiceInterface_GenerateFromBytes_Call) RunAndReturn(run func(ctx context.Context, imageBytes []byte, principal kernel.Principal, altText string, originalFilename string) (*media.Media, error)) *MockMediaServiceInterface_GenerateFromBytes_Call

type MockMediaServiceInterface_GetByID_Call

type MockMediaServiceInterface_GetByID_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_GetByID_Call) Return

func (*MockMediaServiceInterface_GetByID_Call) Run

func (*MockMediaServiceInterface_GetByID_Call) RunAndReturn

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

type MockMediaServiceInterface_SearchMediaByCursor_Call

type MockMediaServiceInterface_SearchMediaByCursor_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_SearchMediaByCursor_Call) Return

func (*MockMediaServiceInterface_SearchMediaByCursor_Call) Run

func (*MockMediaServiceInterface_SearchMediaByCursor_Call) RunAndReturn

func (_c *MockMediaServiceInterface_SearchMediaByCursor_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, search string, dateFilter string, limit int, beforeID int) ([]*media.Media, error)) *MockMediaServiceInterface_SearchMediaByCursor_Call

type MockMediaServiceInterface_Upload_Call

type MockMediaServiceInterface_Upload_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_Upload_Call) Return

func (*MockMediaServiceInterface_Upload_Call) Run

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

func (*MockMediaServiceInterface_Upload_Call) RunAndReturn

func (_c *MockMediaServiceInterface_Upload_Call) RunAndReturn(run func(ctx context.Context, req media.UploadRequest) (*media.Media, error)) *MockMediaServiceInterface_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