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: 3 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 MockRepository

type MockRepository struct {
	mock.Mock
}

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) Create

func (_mock *MockRepository) Create(ctx context.Context, a *alias.Alias) error

Create provides a mock function for the type MockRepository

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 (*MockRepository) FindAll

func (_mock *MockRepository) FindAll(ctx context.Context) ([]*alias.Alias, error)

FindAll provides a mock function for the type MockRepository

func (*MockRepository) FindByAlias

func (_mock *MockRepository) FindByAlias(ctx context.Context, alias1 string) (*alias.Alias, error)

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

func (*MockRepository) Repoint

func (_mock *MockRepository) Repoint(ctx context.Context, aliasStr string, fromContentID int, toContentID int) error

Repoint provides a mock function for the type MockRepository

type MockRepository_Create_Call

type MockRepository_Create_Call struct {
	*mock.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 (*MockRepository_Create_Call) Run

func (*MockRepository_Create_Call) RunAndReturn

type MockRepository_DeleteByContentID_Call

type MockRepository_DeleteByContentID_Call struct {
	*mock.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 (*MockRepository_DeleteByContentID_Call) Run

func (*MockRepository_DeleteByContentID_Call) RunAndReturn

type MockRepository_Expecter

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

func (*MockRepository_Expecter) Create

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

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

type MockRepository_FindAll_Call struct {
	*mock.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 (*MockRepository_FindAll_Call) Run

func (*MockRepository_FindAll_Call) RunAndReturn

type MockRepository_FindByAlias_Call

type MockRepository_FindByAlias_Call struct {
	*mock.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 (*MockRepository_FindByAlias_Call) Run

func (*MockRepository_FindByAlias_Call) RunAndReturn

type MockRepository_FindByContentID_Call

type MockRepository_FindByContentID_Call struct {
	*mock.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 (*MockRepository_FindByContentID_Call) Run

func (*MockRepository_FindByContentID_Call) RunAndReturn

type MockRepository_Repoint_Call

type MockRepository_Repoint_Call struct {
	*mock.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 (*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

Jump to

Keyboard shortcuts

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