mocks

package
v0.6.28 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityService

type ActivityService struct {
	mock.Mock
}

ActivityService is an autogenerated mock type for the ActivityService type

func NewActivityService

func NewActivityService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ActivityService

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

func (*ActivityService) Log

func (_m *ActivityService) Log(ctx context.Context, action string, actor activity.Actor, data interface{}) error

Log provides a mock function with given fields: ctx, action, actor, data

type ActivityService_Expecter

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

func (*ActivityService_Expecter) Log

func (_e *ActivityService_Expecter) Log(ctx interface{}, action interface{}, actor interface{}, data interface{}) *ActivityService_Log_Call

Log is a helper method to define mock.On call

  • ctx context.Context
  • action string
  • actor activity.Actor
  • data interface{}

type ActivityService_Log_Call

type ActivityService_Log_Call struct {
	*mock.Call
}

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

func (*ActivityService_Log_Call) Return

func (*ActivityService_Log_Call) Run

func (_c *ActivityService_Log_Call) Run(run func(ctx context.Context, action string, actor activity.Actor, data interface{})) *ActivityService_Log_Call

func (*ActivityService_Log_Call) RunAndReturn

func (_c *ActivityService_Log_Call) RunAndReturn(run func(context.Context, string, activity.Actor, interface{}) error) *ActivityService_Log_Call

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

func (_m *Repository) Create(ctx context.Context, _a1 user.User) (user.User, error)

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

func (*Repository) CreateMetadataKey

func (_m *Repository) CreateMetadataKey(ctx context.Context, key user.UserMetadataKey) (user.UserMetadataKey, error)

CreateMetadataKey provides a mock function with given fields: ctx, key

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) GetByEmail

func (_m *Repository) GetByEmail(ctx context.Context, email string) (user.User, error)

GetByEmail provides a mock function with given fields: ctx, email

func (*Repository) GetByID

func (_m *Repository) GetByID(ctx context.Context, id string) (user.User, error)

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

func (*Repository) GetByIDs

func (_m *Repository) GetByIDs(ctx context.Context, userIds []string) ([]user.User, error)

GetByIDs provides a mock function with given fields: ctx, userIds

func (*Repository) List

func (_m *Repository) List(ctx context.Context, flt user.Filter) ([]user.User, error)

List provides a mock function with given fields: ctx, flt

func (*Repository) UpdateByEmail

func (_m *Repository) UpdateByEmail(ctx context.Context, toUpdate user.User) (user.User, error)

UpdateByEmail provides a mock function with given fields: ctx, toUpdate

func (*Repository) UpdateByID

func (_m *Repository) UpdateByID(ctx context.Context, toUpdate user.User) (user.User, error)

UpdateByID provides a mock function with given fields: ctx, toUpdate

type Repository_CreateMetadataKey_Call

type Repository_CreateMetadataKey_Call struct {
	*mock.Call
}

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

func (*Repository_CreateMetadataKey_Call) Return

func (*Repository_CreateMetadataKey_Call) Run

func (*Repository_CreateMetadataKey_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_Expecter

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

func (*Repository_Expecter) Create

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

Create is a helper method to define mock.On call

  • ctx context.Context
  • _a1 user.User

func (*Repository_Expecter) CreateMetadataKey

func (_e *Repository_Expecter) CreateMetadataKey(ctx interface{}, key interface{}) *Repository_CreateMetadataKey_Call

CreateMetadataKey is a helper method to define mock.On call

  • ctx context.Context
  • key user.UserMetadataKey

func (*Repository_Expecter) GetByEmail

func (_e *Repository_Expecter) GetByEmail(ctx interface{}, email interface{}) *Repository_GetByEmail_Call

GetByEmail is a helper method to define mock.On call

  • ctx context.Context
  • email string

func (*Repository_Expecter) GetByID

func (_e *Repository_Expecter) GetByID(ctx interface{}, id interface{}) *Repository_GetByID_Call

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Repository_Expecter) GetByIDs

func (_e *Repository_Expecter) GetByIDs(ctx interface{}, userIds interface{}) *Repository_GetByIDs_Call

GetByIDs is a helper method to define mock.On call

  • ctx context.Context
  • userIds []string

func (*Repository_Expecter) List

func (_e *Repository_Expecter) List(ctx interface{}, flt interface{}) *Repository_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • flt user.Filter

func (*Repository_Expecter) UpdateByEmail

func (_e *Repository_Expecter) UpdateByEmail(ctx interface{}, toUpdate interface{}) *Repository_UpdateByEmail_Call

UpdateByEmail is a helper method to define mock.On call

  • ctx context.Context
  • toUpdate user.User

func (*Repository_Expecter) UpdateByID

func (_e *Repository_Expecter) UpdateByID(ctx interface{}, toUpdate interface{}) *Repository_UpdateByID_Call

UpdateByID is a helper method to define mock.On call

  • ctx context.Context
  • toUpdate user.User

type Repository_GetByEmail_Call

type Repository_GetByEmail_Call struct {
	*mock.Call
}

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

func (*Repository_GetByEmail_Call) Return

func (*Repository_GetByEmail_Call) Run

func (*Repository_GetByEmail_Call) RunAndReturn

type Repository_GetByID_Call

type Repository_GetByID_Call struct {
	*mock.Call
}

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

func (*Repository_GetByID_Call) Return

func (*Repository_GetByID_Call) Run

func (*Repository_GetByID_Call) RunAndReturn

type Repository_GetByIDs_Call

type Repository_GetByIDs_Call struct {
	*mock.Call
}

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

func (*Repository_GetByIDs_Call) Return

func (*Repository_GetByIDs_Call) Run

func (_c *Repository_GetByIDs_Call) Run(run func(ctx context.Context, userIds []string)) *Repository_GetByIDs_Call

func (*Repository_GetByIDs_Call) RunAndReturn

type Repository_List_Call

type Repository_List_Call struct {
	*mock.Call
}

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

func (*Repository_List_Call) Return

func (_c *Repository_List_Call) Return(_a0 []user.User, _a1 error) *Repository_List_Call

func (*Repository_List_Call) Run

func (_c *Repository_List_Call) Run(run func(ctx context.Context, flt user.Filter)) *Repository_List_Call

func (*Repository_List_Call) RunAndReturn

func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, user.Filter) ([]user.User, error)) *Repository_List_Call

type Repository_UpdateByEmail_Call

type Repository_UpdateByEmail_Call struct {
	*mock.Call
}

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

func (*Repository_UpdateByEmail_Call) Return

func (*Repository_UpdateByEmail_Call) Run

func (*Repository_UpdateByEmail_Call) RunAndReturn

type Repository_UpdateByID_Call

type Repository_UpdateByID_Call struct {
	*mock.Call
}

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

func (*Repository_UpdateByID_Call) Return

func (*Repository_UpdateByID_Call) Run

func (*Repository_UpdateByID_Call) RunAndReturn

Jump to

Keyboard shortcuts

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