mocks

package
v0.6.35 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityService

type ActivityService struct {
	mock.Mock
}

ActivityService is an autogenerated mock type for the ActivityService type

func NewActivityService

func NewActivityService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ActivityService

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

func (*ActivityService) Log

func (_m *ActivityService) Log(ctx context.Context, action string, actor activity.Actor, data interface{}) error

Log provides a mock function with given fields: ctx, action, actor, data

type ActivityService_Expecter

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

func (*ActivityService_Expecter) Log

func (_e *ActivityService_Expecter) Log(ctx interface{}, action interface{}, actor interface{}, data interface{}) *ActivityService_Log_Call

Log is a helper method to define mock.On call

  • ctx context.Context
  • action string
  • actor activity.Actor
  • data interface{}

type ActivityService_Log_Call

type ActivityService_Log_Call struct {
	*mock.Call
}

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

func (*ActivityService_Log_Call) Return

func (*ActivityService_Log_Call) Run

func (_c *ActivityService_Log_Call) Run(run func(ctx context.Context, action string, actor activity.Actor, data interface{})) *ActivityService_Log_Call

func (*ActivityService_Log_Call) RunAndReturn

func (_c *ActivityService_Log_Call) RunAndReturn(run func(context.Context, string, activity.Actor, interface{}) error) *ActivityService_Log_Call

type CachedRepository

type CachedRepository struct {
	mock.Mock
}

CachedRepository is an autogenerated mock type for the CachedRepository type

func NewCachedRepository

func NewCachedRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *CachedRepository

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

func (*CachedRepository) GetBySlug

func (_m *CachedRepository) GetBySlug(ctx context.Context, slug string) (group.Group, error)

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

type CachedRepository_Expecter

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

func (*CachedRepository_Expecter) GetBySlug

func (_e *CachedRepository_Expecter) GetBySlug(ctx interface{}, slug interface{}) *CachedRepository_GetBySlug_Call

GetBySlug is a helper method to define mock.On call

  • ctx context.Context
  • slug string

type CachedRepository_GetBySlug_Call

type CachedRepository_GetBySlug_Call struct {
	*mock.Call
}

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

func (*CachedRepository_GetBySlug_Call) Return

func (*CachedRepository_GetBySlug_Call) Run

func (*CachedRepository_GetBySlug_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) CheckPermission

func (_m *RelationService) CheckPermission(ctx context.Context, usr user.User, resourceNS namespace.Namespace, resourceIdxa string, _a4 action.Action) (bool, error)

CheckPermission provides a mock function with given fields: ctx, usr, resourceNS, resourceIdxa, _a4

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_CheckPermission_Call

type RelationService_CheckPermission_Call struct {
	*mock.Call
}

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

func (*RelationService_CheckPermission_Call) Return

func (*RelationService_CheckPermission_Call) Run

func (*RelationService_CheckPermission_Call) RunAndReturn

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

func (_e *RelationService_Expecter) CheckPermission(ctx interface{}, usr interface{}, resourceNS interface{}, resourceIdxa interface{}, _a4 interface{}) *RelationService_CheckPermission_Call

CheckPermission is a helper method to define mock.On call

  • ctx context.Context
  • usr user.User
  • resourceNS namespace.Namespace
  • resourceIdxa string
  • _a4 action.Action

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.RelationV2

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

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

func (*Repository) GetBySlug

func (_m *Repository) GetBySlug(ctx context.Context, slug string) (group.Group, error)

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

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

func (_m *Repository) ListGroupRelations(ctx context.Context, objectId string, subjectType string, role string) ([]relation.RelationV2, error)

ListGroupRelations provides a mock function with given fields: ctx, objectId, subjectType, role

func (*Repository) ListUserGroups

func (_m *Repository) ListUserGroups(ctx context.Context, userId string, roleId string) ([]group.Group, error)

ListUserGroups provides a mock function with given fields: ctx, userId, roleId

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

func (*Repository) UpdateBySlug

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

UpdateBySlug 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_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) 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{}) *Repository_GetByIDs_Call

GetByIDs is a helper method to define mock.On call

  • ctx context.Context
  • groupIDs []string

func (*Repository_Expecter) GetBySlug

func (_e *Repository_Expecter) GetBySlug(ctx interface{}, slug interface{}) *Repository_GetBySlug_Call

GetBySlug 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{}, flt interface{}) *Repository_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • flt group.Filter

func (*Repository_Expecter) ListGroupRelations

func (_e *Repository_Expecter) ListGroupRelations(ctx interface{}, objectId interface{}, subjectType interface{}, role interface{}) *Repository_ListGroupRelations_Call

ListGroupRelations is a helper method to define mock.On call

  • ctx context.Context
  • objectId string
  • subjectType string
  • role string

func (*Repository_Expecter) ListUserGroups

func (_e *Repository_Expecter) ListUserGroups(ctx interface{}, userId interface{}, roleId interface{}) *Repository_ListUserGroups_Call

ListUserGroups is a helper method to define mock.On call

  • ctx context.Context
  • userId string
  • roleId string

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

func (*Repository_Expecter) UpdateBySlug

func (_e *Repository_Expecter) UpdateBySlug(ctx interface{}, toUpdate interface{}) *Repository_UpdateBySlug_Call

UpdateBySlug 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)) *Repository_GetByIDs_Call

func (*Repository_GetByIDs_Call) RunAndReturn

type Repository_GetBySlug_Call

type Repository_GetBySlug_Call struct {
	*mock.Call
}

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

func (*Repository_GetBySlug_Call) Return

func (*Repository_GetBySlug_Call) Run

func (*Repository_GetBySlug_Call) RunAndReturn

type Repository_ListGroupRelations_Call

type Repository_ListGroupRelations_Call struct {
	*mock.Call
}

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

func (*Repository_ListGroupRelations_Call) Return

func (*Repository_ListGroupRelations_Call) Run

func (_c *Repository_ListGroupRelations_Call) Run(run func(ctx context.Context, objectId string, subjectType string, role string)) *Repository_ListGroupRelations_Call

func (*Repository_ListGroupRelations_Call) RunAndReturn

type Repository_ListUserGroups_Call

type Repository_ListUserGroups_Call struct {
	*mock.Call
}

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

func (*Repository_ListUserGroups_Call) Return

func (*Repository_ListUserGroups_Call) Run

func (*Repository_ListUserGroups_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_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_UpdateBySlug_Call

type Repository_UpdateBySlug_Call struct {
	*mock.Call
}

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

func (*Repository_UpdateBySlug_Call) Return

func (*Repository_UpdateBySlug_Call) Run

func (*Repository_UpdateBySlug_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) FetchCurrentUser

func (_m *UserService) FetchCurrentUser(ctx context.Context) (user.User, error)

FetchCurrentUser provides a mock function with given fields: ctx

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

func (_e *UserService_Expecter) FetchCurrentUser(ctx interface{}) *UserService_FetchCurrentUser_Call

FetchCurrentUser is a helper method to define mock.On call

  • ctx context.Context

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_FetchCurrentUser_Call

type UserService_FetchCurrentUser_Call struct {
	*mock.Call
}

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

func (*UserService_FetchCurrentUser_Call) Return

func (*UserService_FetchCurrentUser_Call) Run

func (*UserService_FetchCurrentUser_Call) RunAndReturn

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