mocks

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 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 GroupService

type GroupService struct {
	mock.Mock
}

GroupService is an autogenerated mock type for the GroupService type

func NewGroupService

func NewGroupService(t interface {
	mock.TestingT
	Cleanup(func())
}) *GroupService

NewGroupService creates a new instance of GroupService. 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 (*GroupService) AddMember

func (_m *GroupService) AddMember(ctx context.Context, groupID string, principal authenticate.Principal) error

AddMember provides a mock function with given fields: ctx, groupID, principal

func (*GroupService) EXPECT

func (_m *GroupService) EXPECT() *GroupService_Expecter

func (*GroupService) Get

func (_m *GroupService) Get(ctx context.Context, id string) (group.Group, error)

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

func (*GroupService) ListByUser

func (_m *GroupService) ListByUser(ctx context.Context, principalID string, principalType string, flt group.Filter) ([]group.Group, error)

ListByUser provides a mock function with given fields: ctx, principalID, principalType, flt

type GroupService_AddMember_Call

type GroupService_AddMember_Call struct {
	*mock.Call
}

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

func (*GroupService_AddMember_Call) Return

func (*GroupService_AddMember_Call) Run

func (*GroupService_AddMember_Call) RunAndReturn

type GroupService_Expecter

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

func (*GroupService_Expecter) AddMember

func (_e *GroupService_Expecter) AddMember(ctx interface{}, groupID interface{}, principal interface{}) *GroupService_AddMember_Call

AddMember is a helper method to define mock.On call

  • ctx context.Context
  • groupID string
  • principal authenticate.Principal

func (*GroupService_Expecter) Get

func (_e *GroupService_Expecter) Get(ctx interface{}, id interface{}) *GroupService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*GroupService_Expecter) ListByUser

func (_e *GroupService_Expecter) ListByUser(ctx interface{}, principalID interface{}, principalType interface{}, flt interface{}) *GroupService_ListByUser_Call

ListByUser is a helper method to define mock.On call

  • ctx context.Context
  • principalID string
  • principalType string
  • flt group.Filter

type GroupService_Get_Call

type GroupService_Get_Call struct {
	*mock.Call
}

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

func (*GroupService_Get_Call) Return

func (*GroupService_Get_Call) Run

func (*GroupService_Get_Call) RunAndReturn

type GroupService_ListByUser_Call

type GroupService_ListByUser_Call struct {
	*mock.Call
}

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

func (*GroupService_ListByUser_Call) Return

func (*GroupService_ListByUser_Call) Run

func (_c *GroupService_ListByUser_Call) Run(run func(ctx context.Context, principalID string, principalType string, flt group.Filter)) *GroupService_ListByUser_Call

func (*GroupService_ListByUser_Call) RunAndReturn

type OrganizationService

type OrganizationService struct {
	mock.Mock
}

OrganizationService is an autogenerated mock type for the OrganizationService type

func NewOrganizationService

func NewOrganizationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *OrganizationService

NewOrganizationService creates a new instance of OrganizationService. 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 (*OrganizationService) AddMember

func (_m *OrganizationService) AddMember(ctx context.Context, orgID string, relationName string, principal authenticate.Principal) error

AddMember provides a mock function with given fields: ctx, orgID, relationName, principal

func (*OrganizationService) EXPECT

func (*OrganizationService) Get

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

func (*OrganizationService) ListByUser

ListByUser provides a mock function with given fields: ctx, p, f

type OrganizationService_AddMember_Call

type OrganizationService_AddMember_Call struct {
	*mock.Call
}

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

func (*OrganizationService_AddMember_Call) Return

func (*OrganizationService_AddMember_Call) Run

func (*OrganizationService_AddMember_Call) RunAndReturn

type OrganizationService_Expecter

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

func (*OrganizationService_Expecter) AddMember

func (_e *OrganizationService_Expecter) AddMember(ctx interface{}, orgID interface{}, relationName interface{}, principal interface{}) *OrganizationService_AddMember_Call

AddMember is a helper method to define mock.On call

  • ctx context.Context
  • orgID string
  • relationName string
  • principal authenticate.Principal

func (*OrganizationService_Expecter) Get

func (_e *OrganizationService_Expecter) Get(ctx interface{}, id interface{}) *OrganizationService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*OrganizationService_Expecter) ListByUser

func (_e *OrganizationService_Expecter) ListByUser(ctx interface{}, p interface{}, f interface{}) *OrganizationService_ListByUser_Call

ListByUser is a helper method to define mock.On call

  • ctx context.Context
  • p authenticate.Principal
  • f organization.Filter

type OrganizationService_Get_Call

type OrganizationService_Get_Call struct {
	*mock.Call
}

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

func (*OrganizationService_Get_Call) Return

func (*OrganizationService_Get_Call) Run

func (*OrganizationService_Get_Call) RunAndReturn

type OrganizationService_ListByUser_Call

type OrganizationService_ListByUser_Call struct {
	*mock.Call
}

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

func (*OrganizationService_ListByUser_Call) Return

func (*OrganizationService_ListByUser_Call) Run

type PolicyService

type PolicyService struct {
	mock.Mock
}

PolicyService is an autogenerated mock type for the PolicyService type

func NewPolicyService

func NewPolicyService(t interface {
	mock.TestingT
	Cleanup(func())
}) *PolicyService

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

func (_m *PolicyService) Create(ctx context.Context, _a1 policy.Policy) (policy.Policy, error)

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

func (*PolicyService) EXPECT

func (_m *PolicyService) EXPECT() *PolicyService_Expecter

type PolicyService_Create_Call

type PolicyService_Create_Call struct {
	*mock.Call
}

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

func (*PolicyService_Create_Call) Return

func (*PolicyService_Create_Call) Run

func (*PolicyService_Create_Call) RunAndReturn

type PolicyService_Expecter

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

func (*PolicyService_Expecter) Create

func (_e *PolicyService_Expecter) Create(ctx interface{}, _a1 interface{}) *PolicyService_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • _a1 policy.Policy

type PreferencesService

type PreferencesService struct {
	mock.Mock
}

PreferencesService is an autogenerated mock type for the PreferencesService type

func NewPreferencesService

func NewPreferencesService(t interface {
	mock.TestingT
	Cleanup(func())
}) *PreferencesService

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

func (*PreferencesService) LoadPlatformPreferences

func (_m *PreferencesService) LoadPlatformPreferences(ctx context.Context) (map[string]string, error)

LoadPlatformPreferences provides a mock function with given fields: ctx

type PreferencesService_Expecter

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

func (*PreferencesService_Expecter) LoadPlatformPreferences

func (_e *PreferencesService_Expecter) LoadPlatformPreferences(ctx interface{}) *PreferencesService_LoadPlatformPreferences_Call

LoadPlatformPreferences is a helper method to define mock.On call

  • ctx context.Context

type PreferencesService_LoadPlatformPreferences_Call

type PreferencesService_LoadPlatformPreferences_Call struct {
	*mock.Call
}

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

func (*PreferencesService_LoadPlatformPreferences_Call) Return

func (*PreferencesService_LoadPlatformPreferences_Call) Run

func (*PreferencesService_LoadPlatformPreferences_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) Delete

func (_m *RelationService) Delete(ctx context.Context, rel relation.Relation) error

Delete 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_Delete_Call

type RelationService_Delete_Call struct {
	*mock.Call
}

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

func (*RelationService_Delete_Call) Return

func (*RelationService_Delete_Call) Run

func (*RelationService_Delete_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.Relation

func (*RelationService_Expecter) Delete

func (_e *RelationService_Expecter) Delete(ctx interface{}, rel interface{}) *RelationService_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

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

func (_m *Repository) Delete(ctx context.Context, id uuid.UUID) error

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

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) Get

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

func (*Repository) List

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

func (*Repository) ListByUser

func (_m *Repository) ListByUser(ctx context.Context, id string) ([]invitation.Invitation, error)

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

func (*Repository) Set

Set provides a mock function with given fields: ctx, invite

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

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

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

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 uuid.UUID

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 invitation.Filter

func (*Repository_Expecter) ListByUser

func (_e *Repository_Expecter) ListByUser(ctx interface{}, id interface{}) *Repository_ListByUser_Call

ListByUser is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Repository_Expecter) Set

func (_e *Repository_Expecter) Set(ctx interface{}, invite interface{}) *Repository_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • invite invitation.Invitation

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 uuid.UUID)) *Repository_Get_Call

func (*Repository_Get_Call) RunAndReturn

type Repository_ListByUser_Call

type Repository_ListByUser_Call struct {
	*mock.Call
}

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

func (*Repository_ListByUser_Call) Return

func (*Repository_ListByUser_Call) Run

func (*Repository_ListByUser_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 (*Repository_List_Call) RunAndReturn

type Repository_Set_Call

type Repository_Set_Call struct {
	*mock.Call
}

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

func (*Repository_Set_Call) Return

func (*Repository_Set_Call) Run

func (*Repository_Set_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) GetByID

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

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

type UserService_Expecter

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

func (*UserService_Expecter) GetByID

func (_e *UserService_Expecter) GetByID(ctx interface{}, id interface{}) *UserService_GetByID_Call

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id string

type UserService_GetByID_Call

type UserService_GetByID_Call struct {
	*mock.Call
}

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

func (*UserService_GetByID_Call) Return

func (*UserService_GetByID_Call) Run

func (*UserService_GetByID_Call) RunAndReturn

Jump to

Keyboard shortcuts

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