mocks

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 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 PermissionService

type PermissionService struct {
	mock.Mock
}

PermissionService is an autogenerated mock type for the PermissionService type

func NewPermissionService

func NewPermissionService(t interface {
	mock.TestingT
	Cleanup(func())
}) *PermissionService

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

func (*PermissionService) Get

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

type PermissionService_Expecter

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

func (*PermissionService_Expecter) Get

func (_e *PermissionService_Expecter) Get(ctx interface{}, id interface{}) *PermissionService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id string

type PermissionService_Get_Call

type PermissionService_Get_Call struct {
	*mock.Call
}

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

func (*PermissionService_Get_Call) Return

func (*PermissionService_Get_Call) Run

func (*PermissionService_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) 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, roleID string) error

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

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) Get

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

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

func (*Repository) GetByName

func (_m *Repository) GetByName(ctx context.Context, orgID string, name string) (role.Role, error)

GetByName provides a mock function with given fields: ctx, orgID, name

func (*Repository) List

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

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

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, toUpdate role.Role) (role.Role, error)

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

func (*Repository) Upsert

func (_m *Repository) Upsert(ctx context.Context, _a1 role.Role) (role.Role, error)

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

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 (_c *Repository_Delete_Call) Run(run func(ctx context.Context, roleID string)) *Repository_Delete_Call

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{}, roleID interface{}) *Repository_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • roleID 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) GetByName

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

GetByName is a helper method to define mock.On call

  • ctx context.Context
  • orgID string
  • name 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 role.Filter

func (*Repository_Expecter) Update

func (_e *Repository_Expecter) Update(ctx interface{}, toUpdate interface{}) *Repository_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • toUpdate role.Role

func (*Repository_Expecter) Upsert

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 role.Role

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 (_c *Repository_GetByName_Call) Run(run func(ctx context.Context, orgID string, name string)) *Repository_GetByName_Call

func (*Repository_GetByName_Call) RunAndReturn

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 (_c *Repository_Get_Call) Return(_a0 role.Role, _a1 error) *Repository_Get_Call

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

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

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 []role.Role, _a1 error) *Repository_List_Call

func (*Repository_List_Call) Run

func (*Repository_List_Call) RunAndReturn

func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, role.Filter) ([]role.Role, error)) *Repository_List_Call

type Repository_Update_Call

type Repository_Update_Call struct {
	*mock.Call
}

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

func (*Repository_Update_Call) Return

func (*Repository_Update_Call) Run

func (_c *Repository_Update_Call) Run(run func(ctx context.Context, toUpdate role.Role)) *Repository_Update_Call

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

Jump to

Keyboard shortcuts

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