mocks

package
v0.6.20 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProjectService

type ProjectService struct {
	mock.Mock
}

ProjectService is an autogenerated mock type for the ProjectService type

func NewProjectService

func NewProjectService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ProjectService

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

func (*ProjectService) Get

func (_m *ProjectService) Get(ctx context.Context, idOrSlug string) (project.Project, error)

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

type ProjectService_Expecter

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

func (*ProjectService_Expecter) Get

func (_e *ProjectService_Expecter) Get(ctx interface{}, idOrSlug interface{}) *ProjectService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • idOrSlug string

type ProjectService_Get_Call

type ProjectService_Get_Call struct {
	*mock.Call
}

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

func (*ProjectService_Get_Call) Return

func (*ProjectService_Get_Call) Run

func (_c *ProjectService_Get_Call) Run(run func(ctx context.Context, idOrSlug string)) *ProjectService_Get_Call

func (*ProjectService_Get_Call) RunAndReturn

type RelationService

type RelationService struct {
	mock.Mock
}

RelationService is an autogenerated mock type for the RelationService type

func NewRelationService

func NewRelationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *RelationService

NewRelationService creates a new instance of RelationService. 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 (*RelationService) Create

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

func (*RelationService) EXPECT

type RelationService_Create_Call

type RelationService_Create_Call struct {
	*mock.Call
}

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

func (*RelationService_Create_Call) Return

func (*RelationService_Create_Call) Run

func (*RelationService_Create_Call) RunAndReturn

type RelationService_Expecter

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

func (*RelationService_Expecter) Create

func (_e *RelationService_Expecter) Create(ctx interface{}, rel interface{}) *RelationService_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.RelationV2

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

func (_m *Repository) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*Repository) CreateKey

func (_m *Repository) CreateKey(ctx context.Context, key servicedata.Key) (servicedata.Key, error)

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

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) Rollback

func (_m *Repository) Rollback(ctx context.Context, err error) error

Rollback provides a mock function with given fields: ctx, err

func (*Repository) WithTransaction

func (_m *Repository) WithTransaction(ctx context.Context) context.Context

WithTransaction provides a mock function with given fields: ctx

type Repository_Commit_Call

type Repository_Commit_Call struct {
	*mock.Call
}

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

func (*Repository_Commit_Call) Return

func (*Repository_Commit_Call) Run

func (*Repository_Commit_Call) RunAndReturn

func (_c *Repository_Commit_Call) RunAndReturn(run func(context.Context) error) *Repository_Commit_Call

type Repository_CreateKey_Call

type Repository_CreateKey_Call struct {
	*mock.Call
}

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

func (*Repository_CreateKey_Call) Return

func (*Repository_CreateKey_Call) Run

func (*Repository_CreateKey_Call) RunAndReturn

type Repository_Expecter

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

func (*Repository_Expecter) Commit

func (_e *Repository_Expecter) Commit(ctx interface{}) *Repository_Commit_Call

Commit is a helper method to define mock.On call

  • ctx context.Context

func (*Repository_Expecter) CreateKey

func (_e *Repository_Expecter) CreateKey(ctx interface{}, key interface{}) *Repository_CreateKey_Call

CreateKey is a helper method to define mock.On call

  • ctx context.Context
  • key servicedata.Key

func (*Repository_Expecter) Rollback

func (_e *Repository_Expecter) Rollback(ctx interface{}, err interface{}) *Repository_Rollback_Call

Rollback is a helper method to define mock.On call

  • ctx context.Context
  • err error

func (*Repository_Expecter) WithTransaction

func (_e *Repository_Expecter) WithTransaction(ctx interface{}) *Repository_WithTransaction_Call

WithTransaction is a helper method to define mock.On call

  • ctx context.Context

type Repository_Rollback_Call

type Repository_Rollback_Call struct {
	*mock.Call
}

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

func (*Repository_Rollback_Call) Return

func (*Repository_Rollback_Call) Run

func (*Repository_Rollback_Call) RunAndReturn

type Repository_WithTransaction_Call

type Repository_WithTransaction_Call struct {
	*mock.Call
}

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

func (*Repository_WithTransaction_Call) Return

func (*Repository_WithTransaction_Call) Run

func (*Repository_WithTransaction_Call) RunAndReturn

type ResourceService

type ResourceService struct {
	mock.Mock
}

ResourceService is an autogenerated mock type for the ResourceService type

func NewResourceService

func NewResourceService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ResourceService

NewResourceService creates a new instance of ResourceService. 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 (*ResourceService) Create

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

func (*ResourceService) EXPECT

type ResourceService_Create_Call

type ResourceService_Create_Call struct {
	*mock.Call
}

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

func (*ResourceService_Create_Call) Return

func (*ResourceService_Create_Call) Run

func (*ResourceService_Create_Call) RunAndReturn

type ResourceService_Expecter

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

func (*ResourceService_Expecter) Create

func (_e *ResourceService_Expecter) Create(ctx interface{}, res interface{}) *ResourceService_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • res resource.Resource

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