mocks

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

func (_m *Repository) Count(ctx context.Context, f policy.Filter) (int64, error)

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

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

func (_m *Repository) Get(ctx context.Context, id string) (policy.Policy, error)

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

func (*Repository) GroupMemberCount

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

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

func (*Repository) List

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

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

func (*Repository) OrgMemberCount

func (_m *Repository) OrgMemberCount(ctx context.Context, ID string) (policy.MemberCount, error)

OrgMemberCount provides a mock function with given fields: ctx, ID

func (*Repository) ProjectMemberCount

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

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

func (*Repository) Upsert

func (_m *Repository) Upsert(ctx context.Context, pol policy.Policy) (policy.Policy, error)

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

type Repository_Count_Call

type Repository_Count_Call struct {
	*mock.Call
}

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

func (*Repository_Count_Call) Return

func (*Repository_Count_Call) Run

func (*Repository_Count_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) Count

func (_e *Repository_Expecter) Count(ctx interface{}, f interface{}) *Repository_Count_Call

Count is a helper method to define mock.On call

  • ctx context.Context
  • f policy.Filter

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

func (*Repository_Expecter) GroupMemberCount

func (_e *Repository_Expecter) GroupMemberCount(ctx interface{}, IDs interface{}) *Repository_GroupMemberCount_Call

GroupMemberCount is a helper method to define mock.On call

  • ctx context.Context
  • IDs []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 policy.Filter

func (*Repository_Expecter) OrgMemberCount

func (_e *Repository_Expecter) OrgMemberCount(ctx interface{}, ID interface{}) *Repository_OrgMemberCount_Call

OrgMemberCount is a helper method to define mock.On call

  • ctx context.Context
  • ID string

func (*Repository_Expecter) ProjectMemberCount

func (_e *Repository_Expecter) ProjectMemberCount(ctx interface{}, IDs interface{}) *Repository_ProjectMemberCount_Call

ProjectMemberCount is a helper method to define mock.On call

  • ctx context.Context
  • IDs []string

func (*Repository_Expecter) Upsert

func (_e *Repository_Expecter) Upsert(ctx interface{}, pol interface{}) *Repository_Upsert_Call

Upsert is a helper method to define mock.On call

  • ctx context.Context
  • pol policy.Policy

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 string)) *Repository_Get_Call

func (*Repository_Get_Call) RunAndReturn

type Repository_GroupMemberCount_Call

type Repository_GroupMemberCount_Call struct {
	*mock.Call
}

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

func (*Repository_GroupMemberCount_Call) Return

func (*Repository_GroupMemberCount_Call) Run

func (*Repository_GroupMemberCount_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_OrgMemberCount_Call

type Repository_OrgMemberCount_Call struct {
	*mock.Call
}

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

func (*Repository_OrgMemberCount_Call) Return

func (*Repository_OrgMemberCount_Call) Run

func (*Repository_OrgMemberCount_Call) RunAndReturn

type Repository_ProjectMemberCount_Call

type Repository_ProjectMemberCount_Call struct {
	*mock.Call
}

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

func (*Repository_ProjectMemberCount_Call) Return

func (*Repository_ProjectMemberCount_Call) Run

func (*Repository_ProjectMemberCount_Call) RunAndReturn

type Repository_Upsert_Call

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

func (*Repository_Upsert_Call) Run

func (*Repository_Upsert_Call) RunAndReturn

type RoleService

type RoleService struct {
	mock.Mock
}

RoleService is an autogenerated mock type for the RoleService type

func NewRoleService

func NewRoleService(t interface {
	mock.TestingT
	Cleanup(func())
}) *RoleService

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

func (_m *RoleService) EXPECT() *RoleService_Expecter

func (*RoleService) Get

func (_m *RoleService) Get(ctx context.Context, id string) (role.Role, error)

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

func (*RoleService) List

func (_m *RoleService) List(ctx context.Context, f role.Filter) ([]role.Role, error)

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

type RoleService_Expecter

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

func (*RoleService_Expecter) Get

func (_e *RoleService_Expecter) Get(ctx interface{}, id interface{}) *RoleService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*RoleService_Expecter) List

func (_e *RoleService_Expecter) List(ctx interface{}, f interface{}) *RoleService_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • f role.Filter

type RoleService_Get_Call

type RoleService_Get_Call struct {
	*mock.Call
}

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

func (*RoleService_Get_Call) Return

func (*RoleService_Get_Call) Run

func (_c *RoleService_Get_Call) Run(run func(ctx context.Context, id string)) *RoleService_Get_Call

func (*RoleService_Get_Call) RunAndReturn

func (_c *RoleService_Get_Call) RunAndReturn(run func(context.Context, string) (role.Role, error)) *RoleService_Get_Call

type RoleService_List_Call

type RoleService_List_Call struct {
	*mock.Call
}

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

func (*RoleService_List_Call) Return

func (_c *RoleService_List_Call) Return(_a0 []role.Role, _a1 error) *RoleService_List_Call

func (*RoleService_List_Call) Run

func (*RoleService_List_Call) RunAndReturn

Jump to

Keyboard shortcuts

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