Documentation
¶
Index ¶
- type MockMediaService
- func (_mock *MockMediaService) Delete(ctx context.Context, id int, principal kernel.Principal) error
- func (_m *MockMediaService) EXPECT() *MockMediaService_Expecter
- func (_mock *MockMediaService) GetByID(ctx context.Context, id int) (*media.Media, error)
- func (_mock *MockMediaService) ListByCursor(ctx context.Context, userID int, limit int, beforeID int) ([]*media.Media, error)
- func (_mock *MockMediaService) ReencodeLibrary(ctx context.Context) (media.ReencodeSummary, error)
- func (_mock *MockMediaService) Upload(ctx context.Context, req media.UploadRequest) (*media.Media, error)
- type MockMediaService_Delete_Call
- func (_c *MockMediaService_Delete_Call) Return(err error) *MockMediaService_Delete_Call
- func (_c *MockMediaService_Delete_Call) Run(run func(ctx context.Context, id int, principal kernel.Principal)) *MockMediaService_Delete_Call
- func (_c *MockMediaService_Delete_Call) RunAndReturn(run func(ctx context.Context, id int, principal kernel.Principal) error) *MockMediaService_Delete_Call
- type MockMediaService_Expecter
- func (_e *MockMediaService_Expecter) Delete(ctx any, id any, principal any) *MockMediaService_Delete_Call
- func (_e *MockMediaService_Expecter) GetByID(ctx any, id any) *MockMediaService_GetByID_Call
- func (_e *MockMediaService_Expecter) ListByCursor(ctx any, userID any, limit any, beforeID any) *MockMediaService_ListByCursor_Call
- func (_e *MockMediaService_Expecter) ReencodeLibrary(ctx any) *MockMediaService_ReencodeLibrary_Call
- func (_e *MockMediaService_Expecter) Upload(ctx any, req any) *MockMediaService_Upload_Call
- type MockMediaService_GetByID_Call
- func (_c *MockMediaService_GetByID_Call) Return(media1 *media.Media, err error) *MockMediaService_GetByID_Call
- func (_c *MockMediaService_GetByID_Call) Run(run func(ctx context.Context, id int)) *MockMediaService_GetByID_Call
- func (_c *MockMediaService_GetByID_Call) RunAndReturn(run func(ctx context.Context, id int) (*media.Media, error)) *MockMediaService_GetByID_Call
- type MockMediaService_ListByCursor_Call
- func (_c *MockMediaService_ListByCursor_Call) Return(medias []*media.Media, err error) *MockMediaService_ListByCursor_Call
- func (_c *MockMediaService_ListByCursor_Call) Run(run func(ctx context.Context, userID int, limit int, beforeID int)) *MockMediaService_ListByCursor_Call
- func (_c *MockMediaService_ListByCursor_Call) RunAndReturn(...) *MockMediaService_ListByCursor_Call
- type MockMediaService_ReencodeLibrary_Call
- func (_c *MockMediaService_ReencodeLibrary_Call) Return(reencodeSummary media.ReencodeSummary, err error) *MockMediaService_ReencodeLibrary_Call
- func (_c *MockMediaService_ReencodeLibrary_Call) Run(run func(ctx context.Context)) *MockMediaService_ReencodeLibrary_Call
- func (_c *MockMediaService_ReencodeLibrary_Call) RunAndReturn(run func(ctx context.Context) (media.ReencodeSummary, error)) *MockMediaService_ReencodeLibrary_Call
- type MockMediaService_Upload_Call
- func (_c *MockMediaService_Upload_Call) Return(media1 *media.Media, err error) *MockMediaService_Upload_Call
- func (_c *MockMediaService_Upload_Call) Run(run func(ctx context.Context, req media.UploadRequest)) *MockMediaService_Upload_Call
- func (_c *MockMediaService_Upload_Call) RunAndReturn(run func(ctx context.Context, req media.UploadRequest) (*media.Media, error)) *MockMediaService_Upload_Call
- type MockRoleCapabilities
- type MockRoleCapabilities_CanMedia_Call
- func (_c *MockRoleCapabilities_CanMedia_Call) Return(b bool) *MockRoleCapabilities_CanMedia_Call
- func (_c *MockRoleCapabilities_CanMedia_Call) Run(run func(name string)) *MockRoleCapabilities_CanMedia_Call
- func (_c *MockRoleCapabilities_CanMedia_Call) RunAndReturn(run func(name string) bool) *MockRoleCapabilities_CanMedia_Call
- type MockRoleCapabilities_Expecter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockMediaService ¶
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 (_m *MockMediaService) EXPECT() *MockMediaService_Expecter
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
type MockMediaService_Delete_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 (_c *MockMediaService_Delete_Call) Return(err error) *MockMediaService_Delete_Call
func (*MockMediaService_Delete_Call) Run ¶
func (_c *MockMediaService_Delete_Call) Run(run func(ctx context.Context, id int, principal kernel.Principal)) *MockMediaService_Delete_Call
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 ¶
func (_e *MockMediaService_Expecter) GetByID(ctx any, id any) *MockMediaService_GetByID_Call
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
func (_e *MockMediaService_Expecter) ReencodeLibrary(ctx any) *MockMediaService_ReencodeLibrary_Call
ReencodeLibrary is a helper method to define mock.On call
- ctx context.Context
func (*MockMediaService_Expecter) Upload ¶
func (_e *MockMediaService_Expecter) Upload(ctx any, req any) *MockMediaService_Upload_Call
Upload is a helper method to define mock.On call
- ctx context.Context
- req media.UploadRequest
type MockMediaService_GetByID_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 (_c *MockMediaService_GetByID_Call) Run(run func(ctx context.Context, id int)) *MockMediaService_GetByID_Call
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 ¶
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
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 (_c *MockMediaService_ReencodeLibrary_Call) Run(run func(ctx context.Context)) *MockMediaService_ReencodeLibrary_Call
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 ¶
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 ¶
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 ¶
func (_m *MockRoleCapabilities) EXPECT() *MockRoleCapabilities_Expecter
type MockRoleCapabilities_CanMedia_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 (_c *MockRoleCapabilities_CanMedia_Call) Return(b bool) *MockRoleCapabilities_CanMedia_Call
func (*MockRoleCapabilities_CanMedia_Call) Run ¶
func (_c *MockRoleCapabilities_CanMedia_Call) Run(run func(name string)) *MockRoleCapabilities_CanMedia_Call
func (*MockRoleCapabilities_CanMedia_Call) RunAndReturn ¶
func (_c *MockRoleCapabilities_CanMedia_Call) RunAndReturn(run func(name string) bool) *MockRoleCapabilities_CanMedia_Call
type MockRoleCapabilities_Expecter ¶
type MockRoleCapabilities_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRoleCapabilities_Expecter) CanMedia ¶
func (_e *MockRoleCapabilities_Expecter) CanMedia(name any) *MockRoleCapabilities_CanMedia_Call
CanMedia is a helper method to define mock.On call
- name string