mocks

package
v0.6.34 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 5 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, _a1 string, actor activity.Actor, data interface{}) error

Log provides a mock function with given fields: ctx, _a1, 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{}, _a1 interface{}, actor interface{}, data interface{}) *ActivityService_Log_Call

Log is a helper method to define mock.On call

  • ctx context.Context
  • _a1 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, _a1 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) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) Get

func (_m *Repository) Get(ctx context.Context, id string) (action.Action, error)

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

func (*Repository) List

func (_m *Repository) List(ctx context.Context) ([]action.Action, error)

List provides a mock function with given fields: ctx

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, _a1 action.Action) (action.Action, error)

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

func (*Repository) Upsert

func (_m *Repository) Upsert(ctx context.Context, _a1 action.Action) (action.Action, error)

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

type Repository_Expecter

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

func (*Repository_Expecter) Get

func (_e *Repository_Expecter) Get(ctx interface{}, id interface{}) *Repository_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Repository_Expecter) List

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

List is a helper method to define mock.On call

  • ctx context.Context

func (*Repository_Expecter) Update

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

Update is a helper method to define mock.On call

  • ctx context.Context
  • _a1 action.Action

func (*Repository_Expecter) Upsert

func (_e *Repository_Expecter) Upsert(ctx interface{}, _a1 interface{}) *Repository_Upsert_Call

Upsert is a helper method to define mock.On call

  • ctx context.Context
  • _a1 action.Action

type Repository_Get_Call

type Repository_Get_Call struct {
	*mock.Call
}

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

func (*Repository_Get_Call) Return

func (*Repository_Get_Call) Run

func (_c *Repository_Get_Call) Run(run func(ctx context.Context, id string)) *Repository_Get_Call

func (*Repository_Get_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 (*Repository_List_Call) Run

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

func (*Repository_List_Call) RunAndReturn

func (_c *Repository_List_Call) RunAndReturn(run func(context.Context) ([]action.Action, error)) *Repository_List_Call

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 Repository_Upsert_Call

type Repository_Upsert_Call struct {
	*mock.Call
}

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

func (*Repository_Upsert_Call) Return

func (*Repository_Upsert_Call) Run

func (*Repository_Upsert_Call) RunAndReturn

type UserService

type UserService struct {
	mock.Mock
}

UserService is an autogenerated mock type for the UserService type

func NewUserService

func NewUserService(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserService

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

func (_m *UserService) EXPECT() *UserService_Expecter

func (*UserService) FetchCurrentUser

func (_m *UserService) FetchCurrentUser(ctx context.Context) (user.User, error)

FetchCurrentUser provides a mock function with given fields: ctx

type UserService_Expecter

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

func (*UserService_Expecter) FetchCurrentUser

func (_e *UserService_Expecter) FetchCurrentUser(ctx interface{}) *UserService_FetchCurrentUser_Call

FetchCurrentUser is a helper method to define mock.On call

  • ctx context.Context

type UserService_FetchCurrentUser_Call

type UserService_FetchCurrentUser_Call struct {
	*mock.Call
}

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

func (*UserService_FetchCurrentUser_Call) Return

func (*UserService_FetchCurrentUser_Call) Run

func (*UserService_FetchCurrentUser_Call) RunAndReturn

Jump to

Keyboard shortcuts

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