mocks

package
v0.7.1-rc Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityService added in v0.6.26

type ActivityService struct {
	mock.Mock
}

ActivityService is an autogenerated mock type for the ActivityService type

func NewActivityService added in v0.6.26

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 added in v0.6.26

func (*ActivityService) Log added in v0.6.26

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 added in v0.6.26

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

func (*ActivityService_Expecter) Log added in v0.6.26

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 added in v0.6.26

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 added in v0.6.26

func (*ActivityService_Log_Call) Run added in v0.6.26

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 added in v0.6.26

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

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) CheckPermission added in v0.6.22

func (_m *RelationService) CheckPermission(ctx context.Context, usr user.User, resourceNS namespace.Namespace, resourceIdxa string, _a4 action.Action) (bool, error)

CheckPermission provides a mock function with given fields: ctx, usr, resourceNS, resourceIdxa, _a4

func (*RelationService) Create

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

func (*RelationService) EXPECT

func (*RelationService) LookupResources added in v0.6.22

func (_m *RelationService) LookupResources(ctx context.Context, resourceType string, permission string, subjectType string, subjectID string) ([]string, error)

LookupResources provides a mock function with given fields: ctx, resourceType, permission, subjectType, subjectID

type RelationService_CheckPermission_Call added in v0.6.22

type RelationService_CheckPermission_Call struct {
	*mock.Call
}

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

func (*RelationService_CheckPermission_Call) Return added in v0.6.22

func (*RelationService_CheckPermission_Call) Run added in v0.6.22

func (*RelationService_CheckPermission_Call) RunAndReturn added in v0.6.22

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) CheckPermission added in v0.6.22

func (_e *RelationService_Expecter) CheckPermission(ctx interface{}, usr interface{}, resourceNS interface{}, resourceIdxa interface{}, _a4 interface{}) *RelationService_CheckPermission_Call

CheckPermission is a helper method to define mock.On call

  • ctx context.Context
  • usr user.User
  • resourceNS namespace.Namespace
  • resourceIdxa string
  • _a4 action.Action

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

func (*RelationService_Expecter) LookupResources added in v0.6.22

func (_e *RelationService_Expecter) LookupResources(ctx interface{}, resourceType interface{}, permission interface{}, subjectType interface{}, subjectID interface{}) *RelationService_LookupResources_Call

LookupResources is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string
  • permission string
  • subjectType string
  • subjectID string

type RelationService_LookupResources_Call added in v0.6.22

type RelationService_LookupResources_Call struct {
	*mock.Call
}

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

func (*RelationService_LookupResources_Call) Return added in v0.6.22

func (*RelationService_LookupResources_Call) Run added in v0.6.22

func (_c *RelationService_LookupResources_Call) Run(run func(ctx context.Context, resourceType string, permission string, subjectType string, subjectID string)) *RelationService_LookupResources_Call

func (*RelationService_LookupResources_Call) RunAndReturn added in v0.6.22

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) Get added in v0.6.22

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

func (*Repository) GetKeyByURN added in v0.6.22

func (_m *Repository) GetKeyByURN(ctx context.Context, URN string) (servicedata.Key, error)

GetKeyByURN provides a mock function with given fields: ctx, URN

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) Upsert added in v0.6.22

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

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) Get added in v0.6.22

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

Get is a helper method to define mock.On call

  • ctx context.Context
  • filter servicedata.Filter

func (*Repository_Expecter) GetKeyByURN added in v0.6.22

func (_e *Repository_Expecter) GetKeyByURN(ctx interface{}, URN interface{}) *Repository_GetKeyByURN_Call

GetKeyByURN is a helper method to define mock.On call

  • ctx context.Context
  • URN string

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) Upsert added in v0.6.22

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 servicedata.ServiceData

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_GetKeyByURN_Call added in v0.6.22

type Repository_GetKeyByURN_Call struct {
	*mock.Call
}

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

func (*Repository_GetKeyByURN_Call) Return added in v0.6.22

func (*Repository_GetKeyByURN_Call) Run added in v0.6.22

func (*Repository_GetKeyByURN_Call) RunAndReturn added in v0.6.22

type Repository_Get_Call added in v0.6.22

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 added in v0.6.22

func (*Repository_Get_Call) Run added in v0.6.22

func (_c *Repository_Get_Call) Run(run func(ctx context.Context, filter servicedata.Filter)) *Repository_Get_Call

func (*Repository_Get_Call) RunAndReturn added in v0.6.22

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_Upsert_Call added in v0.6.22

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 added in v0.6.22

func (*Repository_Upsert_Call) Run added in v0.6.22

func (*Repository_Upsert_Call) RunAndReturn added in v0.6.22

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

func (*ResourceService) GetByURN added in v0.6.22

func (_m *ResourceService) GetByURN(ctx context.Context, urn string) (resource.Resource, error)

GetByURN provides a mock function with given fields: ctx, urn

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

func (*ResourceService_Expecter) GetByURN added in v0.6.22

func (_e *ResourceService_Expecter) GetByURN(ctx interface{}, urn interface{}) *ResourceService_GetByURN_Call

GetByURN is a helper method to define mock.On call

  • ctx context.Context
  • urn string

type ResourceService_GetByURN_Call added in v0.6.22

type ResourceService_GetByURN_Call struct {
	*mock.Call
}

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

func (*ResourceService_GetByURN_Call) Return added in v0.6.22

func (*ResourceService_GetByURN_Call) Run added in v0.6.22

func (*ResourceService_GetByURN_Call) RunAndReturn added in v0.6.22

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