mocks

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 6 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 MembershipService added in v0.102.0

type MembershipService struct {
	mock.Mock
}

MembershipService is an autogenerated mock type for the MembershipService type

func NewMembershipService added in v0.102.0

func NewMembershipService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MembershipService

NewMembershipService creates a new instance of MembershipService. 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 (*MembershipService) EXPECT added in v0.102.0

func (*MembershipService) ListGroupsByPrincipal added in v0.104.0

func (_m *MembershipService) ListGroupsByPrincipal(ctx context.Context, principal authenticate.Principal, orgID string) ([]string, error)

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

func (*MembershipService) OnGroupCreated added in v0.102.0

func (_m *MembershipService) OnGroupCreated(ctx context.Context, groupID string, orgID string, creatorID string, creatorType string) error

OnGroupCreated provides a mock function with given fields: ctx, groupID, orgID, creatorID, creatorType

type MembershipService_Expecter added in v0.102.0

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

func (*MembershipService_Expecter) ListGroupsByPrincipal added in v0.104.0

func (_e *MembershipService_Expecter) ListGroupsByPrincipal(ctx interface{}, principal interface{}, orgID interface{}) *MembershipService_ListGroupsByPrincipal_Call

ListGroupsByPrincipal is a helper method to define mock.On call

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

func (*MembershipService_Expecter) OnGroupCreated added in v0.102.0

func (_e *MembershipService_Expecter) OnGroupCreated(ctx interface{}, groupID interface{}, orgID interface{}, creatorID interface{}, creatorType interface{}) *MembershipService_OnGroupCreated_Call

OnGroupCreated is a helper method to define mock.On call

  • ctx context.Context
  • groupID string
  • orgID string
  • creatorID string
  • creatorType string

type MembershipService_ListGroupsByPrincipal_Call added in v0.104.0

type MembershipService_ListGroupsByPrincipal_Call struct {
	*mock.Call
}

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

func (*MembershipService_ListGroupsByPrincipal_Call) Return added in v0.104.0

func (*MembershipService_ListGroupsByPrincipal_Call) Run added in v0.104.0

func (*MembershipService_ListGroupsByPrincipal_Call) RunAndReturn added in v0.104.0

type MembershipService_OnGroupCreated_Call added in v0.102.0

type MembershipService_OnGroupCreated_Call struct {
	*mock.Call
}

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

func (*MembershipService_OnGroupCreated_Call) Return added in v0.102.0

func (*MembershipService_OnGroupCreated_Call) Run added in v0.102.0

func (_c *MembershipService_OnGroupCreated_Call) Run(run func(ctx context.Context, groupID string, orgID string, creatorID string, creatorType string)) *MembershipService_OnGroupCreated_Call

func (*MembershipService_OnGroupCreated_Call) RunAndReturn added in v0.102.0

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

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

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

func (*PolicyService) EXPECT

func (_m *PolicyService) EXPECT() *PolicyService_Expecter

func (*PolicyService) GroupMemberCount

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

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

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

type PolicyService_Delete_Call

type PolicyService_Delete_Call struct {
	*mock.Call
}

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

func (*PolicyService_Delete_Call) Return

func (*PolicyService_Delete_Call) Run

func (*PolicyService_Delete_Call) RunAndReturn

type PolicyService_Expecter

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

func (*PolicyService_Expecter) Delete

func (_e *PolicyService_Expecter) Delete(ctx interface{}, id interface{}) *PolicyService_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*PolicyService_Expecter) GroupMemberCount

func (_e *PolicyService_Expecter) GroupMemberCount(ctx interface{}, ids interface{}) *PolicyService_GroupMemberCount_Call

GroupMemberCount is a helper method to define mock.On call

  • ctx context.Context
  • ids []string

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

type PolicyService_GroupMemberCount_Call

type PolicyService_GroupMemberCount_Call struct {
	*mock.Call
}

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

func (*PolicyService_GroupMemberCount_Call) Return

func (*PolicyService_GroupMemberCount_Call) Run

func (*PolicyService_GroupMemberCount_Call) RunAndReturn

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

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

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

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

func (_e *RelationService_Expecter) ListRelations(ctx interface{}, rel interface{}) *RelationService_ListRelations_Call

ListRelations is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

type RelationService_ListRelations_Call

type RelationService_ListRelations_Call struct {
	*mock.Call
}

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

func (*RelationService_ListRelations_Call) Return

func (*RelationService_ListRelations_Call) Run

func (*RelationService_ListRelations_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, grp group.Group) (group.Group, error)

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

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) (group.Group, error)

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

func (*Repository) GetByIDs

func (_m *Repository) GetByIDs(ctx context.Context, groupIDs []string, flt group.Filter) ([]group.Group, error)

GetByIDs provides a mock function with given fields: ctx, groupIDs, flt

func (*Repository) List

func (_m *Repository) List(ctx context.Context, flt group.Filter) ([]group.Group, error)

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

func (*Repository) SetState

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

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

func (*Repository) UpdateByID

func (_m *Repository) UpdateByID(ctx context.Context, toUpdate group.Group) (group.Group, error)

UpdateByID 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{}, grp interface{}) *Repository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • grp group.Group

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

func (_e *Repository_Expecter) GetByIDs(ctx interface{}, groupIDs interface{}, flt interface{}) *Repository_GetByIDs_Call

GetByIDs is a helper method to define mock.On call

  • ctx context.Context
  • groupIDs []string
  • flt group.Filter

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 group.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 group.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 group.Group

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_GetByIDs_Call

type Repository_GetByIDs_Call struct {
	*mock.Call
}

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

func (*Repository_GetByIDs_Call) Return

func (*Repository_GetByIDs_Call) Run

func (_c *Repository_GetByIDs_Call) Run(run func(ctx context.Context, groupIDs []string, flt group.Filter)) *Repository_GetByIDs_Call

func (*Repository_GetByIDs_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 (_c *Repository_List_Call) Return(_a0 []group.Group, _a1 error) *Repository_List_Call

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

Jump to

Keyboard shortcuts

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