Documentation
¶
Index ¶
- type MockRepository
- func (_mock *MockRepository) Create(ctx context.Context, a *alias.Alias) error
- func (_mock *MockRepository) DeleteByContentID(ctx context.Context, contentID int) error
- func (_m *MockRepository) EXPECT() *MockRepository_Expecter
- func (_mock *MockRepository) FindAll(ctx context.Context) ([]*alias.Alias, error)
- func (_mock *MockRepository) FindByAlias(ctx context.Context, alias1 string) (*alias.Alias, error)
- func (_mock *MockRepository) FindByContentID(ctx context.Context, contentID int) ([]*alias.Alias, error)
- func (_mock *MockRepository) Repoint(ctx context.Context, aliasStr string, fromContentID int, toContentID int) error
- type MockRepository_Create_Call
- func (_c *MockRepository_Create_Call) Return(err error) *MockRepository_Create_Call
- func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, a *alias.Alias)) *MockRepository_Create_Call
- func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, a *alias.Alias) error) *MockRepository_Create_Call
- type MockRepository_DeleteByContentID_Call
- func (_c *MockRepository_DeleteByContentID_Call) Return(err error) *MockRepository_DeleteByContentID_Call
- func (_c *MockRepository_DeleteByContentID_Call) Run(run func(ctx context.Context, contentID int)) *MockRepository_DeleteByContentID_Call
- func (_c *MockRepository_DeleteByContentID_Call) RunAndReturn(run func(ctx context.Context, contentID int) error) *MockRepository_DeleteByContentID_Call
- type MockRepository_Expecter
- func (_e *MockRepository_Expecter) Create(ctx any, a any) *MockRepository_Create_Call
- func (_e *MockRepository_Expecter) DeleteByContentID(ctx any, contentID any) *MockRepository_DeleteByContentID_Call
- func (_e *MockRepository_Expecter) FindAll(ctx any) *MockRepository_FindAll_Call
- func (_e *MockRepository_Expecter) FindByAlias(ctx any, alias1 any) *MockRepository_FindByAlias_Call
- func (_e *MockRepository_Expecter) FindByContentID(ctx any, contentID any) *MockRepository_FindByContentID_Call
- func (_e *MockRepository_Expecter) Repoint(ctx any, aliasStr any, fromContentID any, toContentID any) *MockRepository_Repoint_Call
- type MockRepository_FindAll_Call
- func (_c *MockRepository_FindAll_Call) Return(aliass []*alias.Alias, err error) *MockRepository_FindAll_Call
- func (_c *MockRepository_FindAll_Call) Run(run func(ctx context.Context)) *MockRepository_FindAll_Call
- func (_c *MockRepository_FindAll_Call) RunAndReturn(run func(ctx context.Context) ([]*alias.Alias, error)) *MockRepository_FindAll_Call
- type MockRepository_FindByAlias_Call
- func (_c *MockRepository_FindByAlias_Call) Return(alias11 *alias.Alias, err error) *MockRepository_FindByAlias_Call
- func (_c *MockRepository_FindByAlias_Call) Run(run func(ctx context.Context, alias1 string)) *MockRepository_FindByAlias_Call
- func (_c *MockRepository_FindByAlias_Call) RunAndReturn(run func(ctx context.Context, alias1 string) (*alias.Alias, error)) *MockRepository_FindByAlias_Call
- type MockRepository_FindByContentID_Call
- func (_c *MockRepository_FindByContentID_Call) Return(aliass []*alias.Alias, err error) *MockRepository_FindByContentID_Call
- func (_c *MockRepository_FindByContentID_Call) Run(run func(ctx context.Context, contentID int)) *MockRepository_FindByContentID_Call
- func (_c *MockRepository_FindByContentID_Call) RunAndReturn(run func(ctx context.Context, contentID int) ([]*alias.Alias, error)) *MockRepository_FindByContentID_Call
- type MockRepository_Repoint_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRepository ¶
MockRepository is an autogenerated mock type for the Repository type
func NewMockRepository ¶
func NewMockRepository(t interface {
mock.TestingT
Cleanup(func())
}) *MockRepository
NewMockRepository creates a new instance of MockRepository. 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 (*MockRepository) DeleteByContentID ¶
func (_mock *MockRepository) DeleteByContentID(ctx context.Context, contentID int) error
DeleteByContentID provides a mock function for the type MockRepository
func (*MockRepository) EXPECT ¶
func (_m *MockRepository) EXPECT() *MockRepository_Expecter
func (*MockRepository) FindByAlias ¶
FindByAlias provides a mock function for the type MockRepository
func (*MockRepository) FindByContentID ¶
func (_mock *MockRepository) FindByContentID(ctx context.Context, contentID int) ([]*alias.Alias, error)
FindByContentID provides a mock function for the type MockRepository
type MockRepository_Create_Call ¶
MockRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*MockRepository_Create_Call) Return ¶
func (_c *MockRepository_Create_Call) Return(err error) *MockRepository_Create_Call
func (*MockRepository_Create_Call) Run ¶
func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, a *alias.Alias)) *MockRepository_Create_Call
func (*MockRepository_Create_Call) RunAndReturn ¶
func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, a *alias.Alias) error) *MockRepository_Create_Call
type MockRepository_DeleteByContentID_Call ¶
MockRepository_DeleteByContentID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByContentID'
func (*MockRepository_DeleteByContentID_Call) Return ¶
func (_c *MockRepository_DeleteByContentID_Call) Return(err error) *MockRepository_DeleteByContentID_Call
func (*MockRepository_DeleteByContentID_Call) Run ¶
func (_c *MockRepository_DeleteByContentID_Call) Run(run func(ctx context.Context, contentID int)) *MockRepository_DeleteByContentID_Call
func (*MockRepository_DeleteByContentID_Call) RunAndReturn ¶
func (_c *MockRepository_DeleteByContentID_Call) RunAndReturn(run func(ctx context.Context, contentID int) error) *MockRepository_DeleteByContentID_Call
type MockRepository_Expecter ¶
type MockRepository_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRepository_Expecter) Create ¶
func (_e *MockRepository_Expecter) Create(ctx any, a any) *MockRepository_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- a *alias.Alias
func (*MockRepository_Expecter) DeleteByContentID ¶
func (_e *MockRepository_Expecter) DeleteByContentID(ctx any, contentID any) *MockRepository_DeleteByContentID_Call
DeleteByContentID is a helper method to define mock.On call
- ctx context.Context
- contentID int
func (*MockRepository_Expecter) FindAll ¶
func (_e *MockRepository_Expecter) FindAll(ctx any) *MockRepository_FindAll_Call
FindAll is a helper method to define mock.On call
- ctx context.Context
func (*MockRepository_Expecter) FindByAlias ¶
func (_e *MockRepository_Expecter) FindByAlias(ctx any, alias1 any) *MockRepository_FindByAlias_Call
FindByAlias is a helper method to define mock.On call
- ctx context.Context
- alias1 string
func (*MockRepository_Expecter) FindByContentID ¶
func (_e *MockRepository_Expecter) FindByContentID(ctx any, contentID any) *MockRepository_FindByContentID_Call
FindByContentID is a helper method to define mock.On call
- ctx context.Context
- contentID int
func (*MockRepository_Expecter) Repoint ¶
func (_e *MockRepository_Expecter) Repoint(ctx any, aliasStr any, fromContentID any, toContentID any) *MockRepository_Repoint_Call
Repoint is a helper method to define mock.On call
- ctx context.Context
- aliasStr string
- fromContentID int
- toContentID int
type MockRepository_FindAll_Call ¶
MockRepository_FindAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAll'
func (*MockRepository_FindAll_Call) Return ¶
func (_c *MockRepository_FindAll_Call) Return(aliass []*alias.Alias, err error) *MockRepository_FindAll_Call
func (*MockRepository_FindAll_Call) Run ¶
func (_c *MockRepository_FindAll_Call) Run(run func(ctx context.Context)) *MockRepository_FindAll_Call
func (*MockRepository_FindAll_Call) RunAndReturn ¶
func (_c *MockRepository_FindAll_Call) RunAndReturn(run func(ctx context.Context) ([]*alias.Alias, error)) *MockRepository_FindAll_Call
type MockRepository_FindByAlias_Call ¶
MockRepository_FindByAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByAlias'
func (*MockRepository_FindByAlias_Call) Return ¶
func (_c *MockRepository_FindByAlias_Call) Return(alias11 *alias.Alias, err error) *MockRepository_FindByAlias_Call
func (*MockRepository_FindByAlias_Call) Run ¶
func (_c *MockRepository_FindByAlias_Call) Run(run func(ctx context.Context, alias1 string)) *MockRepository_FindByAlias_Call
func (*MockRepository_FindByAlias_Call) RunAndReturn ¶
func (_c *MockRepository_FindByAlias_Call) RunAndReturn(run func(ctx context.Context, alias1 string) (*alias.Alias, error)) *MockRepository_FindByAlias_Call
type MockRepository_FindByContentID_Call ¶
MockRepository_FindByContentID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByContentID'
func (*MockRepository_FindByContentID_Call) Return ¶
func (_c *MockRepository_FindByContentID_Call) Return(aliass []*alias.Alias, err error) *MockRepository_FindByContentID_Call
func (*MockRepository_FindByContentID_Call) Run ¶
func (_c *MockRepository_FindByContentID_Call) Run(run func(ctx context.Context, contentID int)) *MockRepository_FindByContentID_Call
func (*MockRepository_FindByContentID_Call) RunAndReturn ¶
func (_c *MockRepository_FindByContentID_Call) RunAndReturn(run func(ctx context.Context, contentID int) ([]*alias.Alias, error)) *MockRepository_FindByContentID_Call
type MockRepository_Repoint_Call ¶
MockRepository_Repoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Repoint'
func (*MockRepository_Repoint_Call) Return ¶
func (_c *MockRepository_Repoint_Call) Return(err error) *MockRepository_Repoint_Call
func (*MockRepository_Repoint_Call) Run ¶
func (_c *MockRepository_Repoint_Call) Run(run func(ctx context.Context, aliasStr string, fromContentID int, toContentID int)) *MockRepository_Repoint_Call
func (*MockRepository_Repoint_Call) RunAndReturn ¶
func (_c *MockRepository_Repoint_Call) RunAndReturn(run func(ctx context.Context, aliasStr string, fromContentID int, toContentID int) error) *MockRepository_Repoint_Call