mocks

package
v0.0.0-...-ba70d0f Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAuthors

type IAuthors struct {
	mock.Mock
}

IAuthors is an autogenerated mock type for the IAuthors type

func NewIAuthors

func NewIAuthors(t interface {
	mock.TestingT
	Cleanup(func())
}) *IAuthors

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

func (_m *IAuthors) Count(ctx context.Context) (int64, error)

Count provides a mock function with given fields: ctx

func (*IAuthors) Create

func (_m *IAuthors) Create(ctx context.Context, author internal.Authors) (internal.Authors, error)

Create provides a mock function with given fields: ctx, author

func (*IAuthors) Delete

func (_m *IAuthors) Delete(ctx context.Context, id int64) error

Delete provides a mock function with given fields: ctx, id

func (*IAuthors) EXPECT

func (_m *IAuthors) EXPECT() *IAuthors_Expecter

func (*IAuthors) Exists

func (_m *IAuthors) Exists(ctx context.Context, id int64) (bool, error)

Exists provides a mock function with given fields: ctx, id

func (*IAuthors) Get

func (_m *IAuthors) Get(ctx context.Context, id int64) (internal.Authors, error)

Get provides a mock function with given fields: ctx, id

func (*IAuthors) GetAll

func (_m *IAuthors) GetAll(ctx context.Context) ([]internal.Authors, error)

GetAll provides a mock function with given fields: ctx

func (*IAuthors) Update

func (_m *IAuthors) Update(ctx context.Context, id int64, author internal.Authors) (internal.Authors, error)

Update provides a mock function with given fields: ctx, id, author

type IAuthors_Count_Call

type IAuthors_Count_Call struct {
	*mock.Call
}

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

func (*IAuthors_Count_Call) Return

func (_c *IAuthors_Count_Call) Return(_a0 int64, _a1 error) *IAuthors_Count_Call

func (*IAuthors_Count_Call) Run

func (_c *IAuthors_Count_Call) Run(run func(ctx context.Context)) *IAuthors_Count_Call

func (*IAuthors_Count_Call) RunAndReturn

func (_c *IAuthors_Count_Call) RunAndReturn(run func(context.Context) (int64, error)) *IAuthors_Count_Call

type IAuthors_Create_Call

type IAuthors_Create_Call struct {
	*mock.Call
}

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

func (*IAuthors_Create_Call) Return

func (*IAuthors_Create_Call) Run

func (_c *IAuthors_Create_Call) Run(run func(ctx context.Context, author internal.Authors)) *IAuthors_Create_Call

func (*IAuthors_Create_Call) RunAndReturn

type IAuthors_Delete_Call

type IAuthors_Delete_Call struct {
	*mock.Call
}

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

func (*IAuthors_Delete_Call) Return

func (*IAuthors_Delete_Call) Run

func (_c *IAuthors_Delete_Call) Run(run func(ctx context.Context, id int64)) *IAuthors_Delete_Call

func (*IAuthors_Delete_Call) RunAndReturn

func (_c *IAuthors_Delete_Call) RunAndReturn(run func(context.Context, int64) error) *IAuthors_Delete_Call

type IAuthors_Exists_Call

type IAuthors_Exists_Call struct {
	*mock.Call
}

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

func (*IAuthors_Exists_Call) Return

func (_c *IAuthors_Exists_Call) Return(_a0 bool, _a1 error) *IAuthors_Exists_Call

func (*IAuthors_Exists_Call) Run

func (_c *IAuthors_Exists_Call) Run(run func(ctx context.Context, id int64)) *IAuthors_Exists_Call

func (*IAuthors_Exists_Call) RunAndReturn

func (_c *IAuthors_Exists_Call) RunAndReturn(run func(context.Context, int64) (bool, error)) *IAuthors_Exists_Call

type IAuthors_Expecter

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

func (*IAuthors_Expecter) Count

func (_e *IAuthors_Expecter) Count(ctx interface{}) *IAuthors_Count_Call

Count is a helper method to define mock.On call

  • ctx context.Context

func (*IAuthors_Expecter) Create

func (_e *IAuthors_Expecter) Create(ctx interface{}, author interface{}) *IAuthors_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • author internal.Authors

func (*IAuthors_Expecter) Delete

func (_e *IAuthors_Expecter) Delete(ctx interface{}, id interface{}) *IAuthors_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id int64

func (*IAuthors_Expecter) Exists

func (_e *IAuthors_Expecter) Exists(ctx interface{}, id interface{}) *IAuthors_Exists_Call

Exists is a helper method to define mock.On call

  • ctx context.Context
  • id int64

func (*IAuthors_Expecter) Get

func (_e *IAuthors_Expecter) Get(ctx interface{}, id interface{}) *IAuthors_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id int64

func (*IAuthors_Expecter) GetAll

func (_e *IAuthors_Expecter) GetAll(ctx interface{}) *IAuthors_GetAll_Call

GetAll is a helper method to define mock.On call

  • ctx context.Context

func (*IAuthors_Expecter) Update

func (_e *IAuthors_Expecter) Update(ctx interface{}, id interface{}, author interface{}) *IAuthors_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • id int64
  • author internal.Authors

type IAuthors_GetAll_Call

type IAuthors_GetAll_Call struct {
	*mock.Call
}

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

func (*IAuthors_GetAll_Call) Return

func (*IAuthors_GetAll_Call) Run

func (_c *IAuthors_GetAll_Call) Run(run func(ctx context.Context)) *IAuthors_GetAll_Call

func (*IAuthors_GetAll_Call) RunAndReturn

type IAuthors_Get_Call

type IAuthors_Get_Call struct {
	*mock.Call
}

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

func (*IAuthors_Get_Call) Return

func (*IAuthors_Get_Call) Run

func (_c *IAuthors_Get_Call) Run(run func(ctx context.Context, id int64)) *IAuthors_Get_Call

func (*IAuthors_Get_Call) RunAndReturn

func (_c *IAuthors_Get_Call) RunAndReturn(run func(context.Context, int64) (internal.Authors, error)) *IAuthors_Get_Call

type IAuthors_Update_Call

type IAuthors_Update_Call struct {
	*mock.Call
}

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

func (*IAuthors_Update_Call) Return

func (*IAuthors_Update_Call) Run

func (_c *IAuthors_Update_Call) Run(run func(ctx context.Context, id int64, author internal.Authors)) *IAuthors_Update_Call

func (*IAuthors_Update_Call) RunAndReturn

Jump to

Keyboard shortcuts

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