mocks

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelBased

type ModelBased struct {
	mock.Mock
}

ModelBased is an autogenerated mock type for the ModelBased type

func NewModelBased

func NewModelBased(t interface {
	mock.TestingT
	Cleanup(func())
}) *ModelBased

NewModelBased creates a new instance of ModelBased. 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 (*ModelBased) EXPECT

func (_m *ModelBased) EXPECT() *ModelBased_Expecter

func (*ModelBased) GetId

func (_m *ModelBased) GetId() *uint

GetId provides a mock function with given fields:

func (*ModelBased) SetCreatedAt

func (_m *ModelBased) SetCreatedAt(createdAt *time.Time)

SetCreatedAt provides a mock function with given fields: createdAt

func (*ModelBased) SetUpdatedAt

func (_m *ModelBased) SetUpdatedAt(updatedAt *time.Time)

SetUpdatedAt provides a mock function with given fields: updatedAt

type ModelBased_Expecter

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

func (*ModelBased_Expecter) GetId

GetId is a helper method to define mock.On call

func (*ModelBased_Expecter) SetCreatedAt

func (_e *ModelBased_Expecter) SetCreatedAt(createdAt interface{}) *ModelBased_SetCreatedAt_Call

SetCreatedAt is a helper method to define mock.On call

  • createdAt *time.Time

func (*ModelBased_Expecter) SetUpdatedAt

func (_e *ModelBased_Expecter) SetUpdatedAt(updatedAt interface{}) *ModelBased_SetUpdatedAt_Call

SetUpdatedAt is a helper method to define mock.On call

  • updatedAt *time.Time

type ModelBased_GetId_Call

type ModelBased_GetId_Call struct {
	*mock.Call
}

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

func (*ModelBased_GetId_Call) Return

func (*ModelBased_GetId_Call) Run

func (_c *ModelBased_GetId_Call) Run(run func()) *ModelBased_GetId_Call

func (*ModelBased_GetId_Call) RunAndReturn

func (_c *ModelBased_GetId_Call) RunAndReturn(run func() *uint) *ModelBased_GetId_Call

type ModelBased_SetCreatedAt_Call

type ModelBased_SetCreatedAt_Call struct {
	*mock.Call
}

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

func (*ModelBased_SetCreatedAt_Call) Return

func (*ModelBased_SetCreatedAt_Call) Run

func (_c *ModelBased_SetCreatedAt_Call) Run(run func(createdAt *time.Time)) *ModelBased_SetCreatedAt_Call

func (*ModelBased_SetCreatedAt_Call) RunAndReturn

type ModelBased_SetUpdatedAt_Call

type ModelBased_SetUpdatedAt_Call struct {
	*mock.Call
}

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

func (*ModelBased_SetUpdatedAt_Call) Return

func (*ModelBased_SetUpdatedAt_Call) Run

func (_c *ModelBased_SetUpdatedAt_Call) Run(run func(updatedAt *time.Time)) *ModelBased_SetUpdatedAt_Call

func (*ModelBased_SetUpdatedAt_Call) RunAndReturn

type Repository

type Repository struct {
	mock.Mock
}

Repository is an autogenerated mock type for the Repository type

func NewRepository

func NewRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *Repository

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

func (_m *Repository) Count(ctx context.Context, qb *db_repo.QueryBuilder, model db_repo.ModelBased) (int, error)

Count provides a mock function with given fields: ctx, qb, model

func (*Repository) Create

func (_m *Repository) Create(ctx context.Context, value db_repo.ModelBased) error

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

func (*Repository) Delete

func (_m *Repository) Delete(ctx context.Context, value db_repo.ModelBased) error

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

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) GetMetadata

func (_m *Repository) GetMetadata() db_repo.Metadata

GetMetadata provides a mock function with given fields:

func (*Repository) GetModelId

func (_m *Repository) GetModelId() string

GetModelId provides a mock function with given fields:

func (*Repository) GetModelName

func (_m *Repository) GetModelName() string

GetModelName provides a mock function with given fields:

func (*Repository) Query

func (_m *Repository) Query(ctx context.Context, qb *db_repo.QueryBuilder, result interface{}) error

Query provides a mock function with given fields: ctx, qb, result

func (*Repository) Read

func (_m *Repository) Read(ctx context.Context, id *uint, out db_repo.ModelBased) error

Read provides a mock function with given fields: ctx, id, out

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, value db_repo.ModelBased) error

Update provides a mock function with given fields: ctx, value

type RepositoryReadOnly

type RepositoryReadOnly struct {
	mock.Mock
}

RepositoryReadOnly is an autogenerated mock type for the RepositoryReadOnly type

func NewRepositoryReadOnly

func NewRepositoryReadOnly(t interface {
	mock.TestingT
	Cleanup(func())
}) *RepositoryReadOnly

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

Count provides a mock function with given fields: ctx, qb, model

func (*RepositoryReadOnly) EXPECT

func (*RepositoryReadOnly) GetMetadata

func (_m *RepositoryReadOnly) GetMetadata() db_repo.Metadata

GetMetadata provides a mock function with given fields:

func (*RepositoryReadOnly) GetModelId

func (_m *RepositoryReadOnly) GetModelId() string

GetModelId provides a mock function with given fields:

func (*RepositoryReadOnly) GetModelName

func (_m *RepositoryReadOnly) GetModelName() string

GetModelName provides a mock function with given fields:

func (*RepositoryReadOnly) Query

func (_m *RepositoryReadOnly) Query(ctx context.Context, qb *db_repo.QueryBuilder, result interface{}) error

Query provides a mock function with given fields: ctx, qb, result

func (*RepositoryReadOnly) Read

func (_m *RepositoryReadOnly) Read(ctx context.Context, id *uint, out db_repo.ModelBased) error

Read provides a mock function with given fields: ctx, id, out

type RepositoryReadOnly_Count_Call

type RepositoryReadOnly_Count_Call struct {
	*mock.Call
}

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

func (*RepositoryReadOnly_Count_Call) Return

func (*RepositoryReadOnly_Count_Call) Run

func (*RepositoryReadOnly_Count_Call) RunAndReturn

type RepositoryReadOnly_Expecter

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

func (*RepositoryReadOnly_Expecter) Count

func (_e *RepositoryReadOnly_Expecter) Count(ctx interface{}, qb interface{}, model interface{}) *RepositoryReadOnly_Count_Call

Count is a helper method to define mock.On call

  • ctx context.Context
  • qb *db_repo.QueryBuilder
  • model db_repo.ModelBased

func (*RepositoryReadOnly_Expecter) GetMetadata

GetMetadata is a helper method to define mock.On call

func (*RepositoryReadOnly_Expecter) GetModelId

GetModelId is a helper method to define mock.On call

func (*RepositoryReadOnly_Expecter) GetModelName

GetModelName is a helper method to define mock.On call

func (*RepositoryReadOnly_Expecter) Query

func (_e *RepositoryReadOnly_Expecter) Query(ctx interface{}, qb interface{}, result interface{}) *RepositoryReadOnly_Query_Call

Query is a helper method to define mock.On call

  • ctx context.Context
  • qb *db_repo.QueryBuilder
  • result interface{}

func (*RepositoryReadOnly_Expecter) Read

func (_e *RepositoryReadOnly_Expecter) Read(ctx interface{}, id interface{}, out interface{}) *RepositoryReadOnly_Read_Call

Read is a helper method to define mock.On call

  • ctx context.Context
  • id *uint
  • out db_repo.ModelBased

type RepositoryReadOnly_GetMetadata_Call

type RepositoryReadOnly_GetMetadata_Call struct {
	*mock.Call
}

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

func (*RepositoryReadOnly_GetMetadata_Call) Return

func (*RepositoryReadOnly_GetMetadata_Call) Run

func (*RepositoryReadOnly_GetMetadata_Call) RunAndReturn

type RepositoryReadOnly_GetModelId_Call

type RepositoryReadOnly_GetModelId_Call struct {
	*mock.Call
}

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

func (*RepositoryReadOnly_GetModelId_Call) Return

func (*RepositoryReadOnly_GetModelId_Call) Run

func (*RepositoryReadOnly_GetModelId_Call) RunAndReturn

type RepositoryReadOnly_GetModelName_Call

type RepositoryReadOnly_GetModelName_Call struct {
	*mock.Call
}

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

func (*RepositoryReadOnly_GetModelName_Call) Return

func (*RepositoryReadOnly_GetModelName_Call) Run

func (*RepositoryReadOnly_GetModelName_Call) RunAndReturn

type RepositoryReadOnly_Query_Call

type RepositoryReadOnly_Query_Call struct {
	*mock.Call
}

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

func (*RepositoryReadOnly_Query_Call) Return

func (*RepositoryReadOnly_Query_Call) Run

func (_c *RepositoryReadOnly_Query_Call) Run(run func(ctx context.Context, qb *db_repo.QueryBuilder, result interface{})) *RepositoryReadOnly_Query_Call

func (*RepositoryReadOnly_Query_Call) RunAndReturn

type RepositoryReadOnly_Read_Call

type RepositoryReadOnly_Read_Call struct {
	*mock.Call
}

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

func (*RepositoryReadOnly_Read_Call) Return

func (*RepositoryReadOnly_Read_Call) Run

func (*RepositoryReadOnly_Read_Call) RunAndReturn

type Repository_Count_Call

type Repository_Count_Call struct {
	*mock.Call
}

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

func (*Repository_Count_Call) Return

func (_c *Repository_Count_Call) Return(_a0 int, _a1 error) *Repository_Count_Call

func (*Repository_Count_Call) Run

func (*Repository_Count_Call) RunAndReturn

type Repository_Create_Call

type Repository_Create_Call struct {
	*mock.Call
}

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

func (*Repository_Create_Call) Return

func (*Repository_Create_Call) Run

func (*Repository_Create_Call) RunAndReturn

type Repository_Delete_Call

type Repository_Delete_Call struct {
	*mock.Call
}

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

func (*Repository_Delete_Call) Return

func (*Repository_Delete_Call) Run

func (*Repository_Delete_Call) RunAndReturn

type Repository_Expecter

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

func (*Repository_Expecter) Count

func (_e *Repository_Expecter) Count(ctx interface{}, qb interface{}, model interface{}) *Repository_Count_Call

Count is a helper method to define mock.On call

  • ctx context.Context
  • qb *db_repo.QueryBuilder
  • model db_repo.ModelBased

func (*Repository_Expecter) Create

func (_e *Repository_Expecter) Create(ctx interface{}, value interface{}) *Repository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • value db_repo.ModelBased

func (*Repository_Expecter) Delete

func (_e *Repository_Expecter) Delete(ctx interface{}, value interface{}) *Repository_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • value db_repo.ModelBased

func (*Repository_Expecter) GetMetadata

GetMetadata is a helper method to define mock.On call

func (*Repository_Expecter) GetModelId

GetModelId is a helper method to define mock.On call

func (*Repository_Expecter) GetModelName

GetModelName is a helper method to define mock.On call

func (*Repository_Expecter) Query

func (_e *Repository_Expecter) Query(ctx interface{}, qb interface{}, result interface{}) *Repository_Query_Call

Query is a helper method to define mock.On call

  • ctx context.Context
  • qb *db_repo.QueryBuilder
  • result interface{}

func (*Repository_Expecter) Read

func (_e *Repository_Expecter) Read(ctx interface{}, id interface{}, out interface{}) *Repository_Read_Call

Read is a helper method to define mock.On call

  • ctx context.Context
  • id *uint
  • out db_repo.ModelBased

func (*Repository_Expecter) Update

func (_e *Repository_Expecter) Update(ctx interface{}, value interface{}) *Repository_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • value db_repo.ModelBased

type Repository_GetMetadata_Call

type Repository_GetMetadata_Call struct {
	*mock.Call
}

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

func (*Repository_GetMetadata_Call) Return

func (*Repository_GetMetadata_Call) Run

func (*Repository_GetMetadata_Call) RunAndReturn

type Repository_GetModelId_Call

type Repository_GetModelId_Call struct {
	*mock.Call
}

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

func (*Repository_GetModelId_Call) Return

func (*Repository_GetModelId_Call) Run

func (*Repository_GetModelId_Call) RunAndReturn

func (_c *Repository_GetModelId_Call) RunAndReturn(run func() string) *Repository_GetModelId_Call

type Repository_GetModelName_Call

type Repository_GetModelName_Call struct {
	*mock.Call
}

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

func (*Repository_GetModelName_Call) Return

func (*Repository_GetModelName_Call) Run

func (*Repository_GetModelName_Call) RunAndReturn

type Repository_Query_Call

type Repository_Query_Call struct {
	*mock.Call
}

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

func (*Repository_Query_Call) Return

func (*Repository_Query_Call) Run

func (_c *Repository_Query_Call) Run(run func(ctx context.Context, qb *db_repo.QueryBuilder, result interface{})) *Repository_Query_Call

func (*Repository_Query_Call) RunAndReturn

func (_c *Repository_Query_Call) RunAndReturn(run func(context.Context, *db_repo.QueryBuilder, interface{}) error) *Repository_Query_Call

type Repository_Read_Call

type Repository_Read_Call struct {
	*mock.Call
}

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

func (*Repository_Read_Call) Return

func (*Repository_Read_Call) Run

func (*Repository_Read_Call) RunAndReturn

type Repository_Update_Call

type Repository_Update_Call struct {
	*mock.Call
}

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

func (*Repository_Update_Call) Return

func (*Repository_Update_Call) Run

func (*Repository_Update_Call) RunAndReturn

type TimeStampable

type TimeStampable struct {
	mock.Mock
}

TimeStampable is an autogenerated mock type for the TimeStampable type

func NewTimeStampable

func NewTimeStampable(t interface {
	mock.TestingT
	Cleanup(func())
}) *TimeStampable

NewTimeStampable creates a new instance of TimeStampable. 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 (*TimeStampable) EXPECT

func (_m *TimeStampable) EXPECT() *TimeStampable_Expecter

func (*TimeStampable) SetCreatedAt

func (_m *TimeStampable) SetCreatedAt(createdAt *time.Time)

SetCreatedAt provides a mock function with given fields: createdAt

func (*TimeStampable) SetUpdatedAt

func (_m *TimeStampable) SetUpdatedAt(updatedAt *time.Time)

SetUpdatedAt provides a mock function with given fields: updatedAt

type TimeStampable_Expecter

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

func (*TimeStampable_Expecter) SetCreatedAt

func (_e *TimeStampable_Expecter) SetCreatedAt(createdAt interface{}) *TimeStampable_SetCreatedAt_Call

SetCreatedAt is a helper method to define mock.On call

  • createdAt *time.Time

func (*TimeStampable_Expecter) SetUpdatedAt

func (_e *TimeStampable_Expecter) SetUpdatedAt(updatedAt interface{}) *TimeStampable_SetUpdatedAt_Call

SetUpdatedAt is a helper method to define mock.On call

  • updatedAt *time.Time

type TimeStampable_SetCreatedAt_Call

type TimeStampable_SetCreatedAt_Call struct {
	*mock.Call
}

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

func (*TimeStampable_SetCreatedAt_Call) Return

func (*TimeStampable_SetCreatedAt_Call) Run

func (*TimeStampable_SetCreatedAt_Call) RunAndReturn

type TimeStampable_SetUpdatedAt_Call

type TimeStampable_SetUpdatedAt_Call struct {
	*mock.Call
}

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

func (*TimeStampable_SetUpdatedAt_Call) Return

func (*TimeStampable_SetUpdatedAt_Call) Run

func (*TimeStampable_SetUpdatedAt_Call) RunAndReturn

Jump to

Keyboard shortcuts

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