mocks

package
v0.33.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthnService

type AuthnService struct {
	mock.Mock
}

AuthnService is an autogenerated mock type for the AuthnService type

func NewAuthnService

func NewAuthnService(t interface {
	mock.TestingT
	Cleanup(func())
}) *AuthnService

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

func (_m *AuthnService) EXPECT() *AuthnService_Expecter

func (*AuthnService) GetPrincipal

GetPrincipal provides a mock function with given fields: ctx, via

type AuthnService_Expecter

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

func (*AuthnService_Expecter) GetPrincipal

func (_e *AuthnService_Expecter) GetPrincipal(ctx interface{}, via ...interface{}) *AuthnService_GetPrincipal_Call

GetPrincipal is a helper method to define mock.On call

  • ctx context.Context
  • via ...authenticate.ClientAssertion

type AuthnService_GetPrincipal_Call

type AuthnService_GetPrincipal_Call struct {
	*mock.Call
}

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

func (*AuthnService_GetPrincipal_Call) Return

func (*AuthnService_GetPrincipal_Call) Run

func (*AuthnService_GetPrincipal_Call) RunAndReturn

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

func (_m *GroupService) EXPECT() *GroupService_Expecter

func (*GroupService) GetByIDs

func (_m *GroupService) GetByIDs(ctx context.Context, ids []string) ([]group.Group, error)

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

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_Expecter

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

func (*GroupService_Expecter) GetByIDs

func (_e *GroupService_Expecter) GetByIDs(ctx interface{}, ids interface{}) *GroupService_GetByIDs_Call

GetByIDs is a helper method to define mock.On call

  • ctx context.Context
  • ids []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_GetByIDs_Call

type GroupService_GetByIDs_Call struct {
	*mock.Call
}

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

func (*GroupService_GetByIDs_Call) Return

func (*GroupService_GetByIDs_Call) Run

func (*GroupService_GetByIDs_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 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

func (*PolicyService) List

func (_m *PolicyService) List(ctx context.Context, flt policy.Filter) ([]policy.Policy, error)

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

func (*PolicyService) ProjectMemberCount

func (_m *PolicyService) ProjectMemberCount(ctx context.Context, ids []string) ([]policy.MemberCount, error)

ProjectMemberCount provides a mock function with given fields: ctx, ids

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

func (*PolicyService_Expecter) List

func (_e *PolicyService_Expecter) List(ctx interface{}, flt interface{}) *PolicyService_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • flt policy.Filter

func (*PolicyService_Expecter) ProjectMemberCount

func (_e *PolicyService_Expecter) ProjectMemberCount(ctx interface{}, ids interface{}) *PolicyService_ProjectMemberCount_Call

ProjectMemberCount is a helper method to define mock.On call

  • ctx context.Context
  • ids []string

type PolicyService_List_Call

type PolicyService_List_Call struct {
	*mock.Call
}

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

func (*PolicyService_List_Call) Return

func (*PolicyService_List_Call) Run

func (*PolicyService_List_Call) RunAndReturn

type PolicyService_ProjectMemberCount_Call

type PolicyService_ProjectMemberCount_Call struct {
	*mock.Call
}

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

func (*PolicyService_ProjectMemberCount_Call) Return

func (*PolicyService_ProjectMemberCount_Call) Run

func (*PolicyService_ProjectMemberCount_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

func (*RelationService) LookupResources

func (_m *RelationService) LookupResources(ctx context.Context, rel relation.Relation) ([]string, error)

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

func (*RelationService) LookupSubjects

func (_m *RelationService) LookupSubjects(ctx context.Context, rel relation.Relation) ([]string, error)

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

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

func (*RelationService_Expecter) LookupResources

func (_e *RelationService_Expecter) LookupResources(ctx interface{}, rel interface{}) *RelationService_LookupResources_Call

LookupResources is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

func (*RelationService_Expecter) LookupSubjects

func (_e *RelationService_Expecter) LookupSubjects(ctx interface{}, rel interface{}) *RelationService_LookupSubjects_Call

LookupSubjects is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

type RelationService_LookupResources_Call

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

func (*RelationService_LookupResources_Call) Run

func (*RelationService_LookupResources_Call) RunAndReturn

type RelationService_LookupSubjects_Call

type RelationService_LookupSubjects_Call struct {
	*mock.Call
}

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

func (*RelationService_LookupSubjects_Call) Return

func (*RelationService_LookupSubjects_Call) Run

func (*RelationService_LookupSubjects_Call) RunAndReturn

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, org project.Project) (project.Project, error)

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

func (*Repository) Delete

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

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

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) GetByID

func (_m *Repository) GetByID(ctx context.Context, id string) (project.Project, error)

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

func (*Repository) GetByName

func (_m *Repository) GetByName(ctx context.Context, slug string) (project.Project, error)

GetByName provides a mock function with given fields: ctx, slug

func (*Repository) List

func (_m *Repository) List(ctx context.Context, f project.Filter) ([]project.Project, error)

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

func (*Repository) SetState

func (_m *Repository) SetState(ctx context.Context, id string, state project.State) error

SetState provides a mock function with given fields: ctx, id, state

func (*Repository) UpdateByID

func (_m *Repository) UpdateByID(ctx context.Context, toUpdate project.Project) (project.Project, error)

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

func (*Repository) UpdateByName

func (_m *Repository) UpdateByName(ctx context.Context, toUpdate project.Project) (project.Project, error)

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

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

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

Create is a helper method to define mock.On call

  • ctx context.Context
  • org project.Project

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

func (_e *Repository_Expecter) GetByName(ctx interface{}, slug interface{}) *Repository_GetByName_Call

GetByName is a helper method to define mock.On call

  • ctx context.Context
  • slug string

func (*Repository_Expecter) List

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

List is a helper method to define mock.On call

  • ctx context.Context
  • f project.Filter

func (*Repository_Expecter) SetState

func (_e *Repository_Expecter) SetState(ctx interface{}, id interface{}, state interface{}) *Repository_SetState_Call

SetState is a helper method to define mock.On call

  • ctx context.Context
  • id string
  • state project.State

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 project.Project

func (*Repository_Expecter) UpdateByName

func (_e *Repository_Expecter) UpdateByName(ctx interface{}, toUpdate interface{}) *Repository_UpdateByName_Call

UpdateByName is a helper method to define mock.On call

  • ctx context.Context
  • toUpdate project.Project

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_GetByName_Call

type Repository_GetByName_Call struct {
	*mock.Call
}

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

func (*Repository_GetByName_Call) Return

func (*Repository_GetByName_Call) Run

func (*Repository_GetByName_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_SetState_Call

type Repository_SetState_Call struct {
	*mock.Call
}

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

func (*Repository_SetState_Call) Return

func (*Repository_SetState_Call) Run

func (*Repository_SetState_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

type Repository_UpdateByName_Call

type Repository_UpdateByName_Call struct {
	*mock.Call
}

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

func (*Repository_UpdateByName_Call) Return

func (*Repository_UpdateByName_Call) Run

func (*Repository_UpdateByName_Call) RunAndReturn

type ServiceuserService

type ServiceuserService struct {
	mock.Mock
}

ServiceuserService is an autogenerated mock type for the ServiceuserService type

func NewServiceuserService

func NewServiceuserService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ServiceuserService

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

func (*ServiceuserService) GetByIDs

func (_m *ServiceuserService) GetByIDs(ctx context.Context, ids []string) ([]serviceuser.ServiceUser, error)

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

type ServiceuserService_Expecter

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

func (*ServiceuserService_Expecter) GetByIDs

func (_e *ServiceuserService_Expecter) GetByIDs(ctx interface{}, ids interface{}) *ServiceuserService_GetByIDs_Call

GetByIDs is a helper method to define mock.On call

  • ctx context.Context
  • ids []string

type ServiceuserService_GetByIDs_Call

type ServiceuserService_GetByIDs_Call struct {
	*mock.Call
}

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

func (*ServiceuserService_GetByIDs_Call) Return

func (*ServiceuserService_GetByIDs_Call) Run

func (*ServiceuserService_GetByIDs_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

func (*UserService) GetByIDs

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

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

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

func (*UserService_Expecter) GetByIDs

func (_e *UserService_Expecter) GetByIDs(ctx interface{}, userIDs interface{}) *UserService_GetByIDs_Call

GetByIDs is a helper method to define mock.On call

  • ctx context.Context
  • userIDs []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

type UserService_GetByIDs_Call

type UserService_GetByIDs_Call struct {
	*mock.Call
}

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

func (*UserService_GetByIDs_Call) Return

func (*UserService_GetByIDs_Call) Run

func (_c *UserService_GetByIDs_Call) Run(run func(ctx context.Context, userIDs []string)) *UserService_GetByIDs_Call

func (*UserService_GetByIDs_Call) RunAndReturn

Jump to

Keyboard shortcuts

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