mocks

package
v0.7.0 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: 6 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 AuthzRepository

type AuthzRepository struct {
	mock.Mock
}

AuthzRepository is an autogenerated mock type for the AuthzRepository type

func NewAuthzRepository

func NewAuthzRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *AuthzRepository

NewAuthzRepository creates a new instance of AuthzRepository. 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 (*AuthzRepository) Add

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

func (*AuthzRepository) AddV2

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

func (*AuthzRepository) BulkCheck

func (_m *AuthzRepository) BulkCheck(ctx context.Context, rels []relation.Relation, acts []action.Action) ([]relation.Permission, error)

BulkCheck provides a mock function with given fields: ctx, rels, acts

func (*AuthzRepository) Check

func (_m *AuthzRepository) Check(ctx context.Context, rel relation.Relation, act action.Action) (bool, error)

Check provides a mock function with given fields: ctx, rel, act

func (*AuthzRepository) CheckIsPublic added in v0.6.31

func (_m *AuthzRepository) CheckIsPublic(ctx context.Context, rel relation.Relation, act action.Action) (bool, error)

CheckIsPublic provides a mock function with given fields: ctx, rel, act

func (*AuthzRepository) DeleteSubjectRelations

func (_m *AuthzRepository) DeleteSubjectRelations(ctx context.Context, resourceType string, optionalResourceID string) error

DeleteSubjectRelations provides a mock function with given fields: ctx, resourceType, optionalResourceID

func (*AuthzRepository) DeleteV2

func (_m *AuthzRepository) DeleteV2(ctx context.Context, rel relation.RelationV2) error

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

func (*AuthzRepository) EXPECT

func (*AuthzRepository) LookupResources

func (_m *AuthzRepository) LookupResources(ctx context.Context, resourceType string, permission string, subjectType string, subjectID string) ([]string, error)

LookupResources provides a mock function with given fields: ctx, resourceType, permission, subjectType, subjectID

type AuthzRepository_AddV2_Call

type AuthzRepository_AddV2_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_AddV2_Call) Return

func (*AuthzRepository_AddV2_Call) Run

func (*AuthzRepository_AddV2_Call) RunAndReturn

type AuthzRepository_Add_Call

type AuthzRepository_Add_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_Add_Call) Return

func (*AuthzRepository_Add_Call) Run

func (*AuthzRepository_Add_Call) RunAndReturn

type AuthzRepository_BulkCheck_Call

type AuthzRepository_BulkCheck_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_BulkCheck_Call) Return

func (*AuthzRepository_BulkCheck_Call) Run

func (*AuthzRepository_BulkCheck_Call) RunAndReturn

type AuthzRepository_CheckIsPublic_Call added in v0.6.31

type AuthzRepository_CheckIsPublic_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_CheckIsPublic_Call) Return added in v0.6.31

func (*AuthzRepository_CheckIsPublic_Call) Run added in v0.6.31

func (*AuthzRepository_CheckIsPublic_Call) RunAndReturn added in v0.6.31

type AuthzRepository_Check_Call

type AuthzRepository_Check_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_Check_Call) Return

func (*AuthzRepository_Check_Call) Run

func (*AuthzRepository_Check_Call) RunAndReturn

type AuthzRepository_DeleteSubjectRelations_Call

type AuthzRepository_DeleteSubjectRelations_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_DeleteSubjectRelations_Call) Return

func (*AuthzRepository_DeleteSubjectRelations_Call) Run

func (*AuthzRepository_DeleteSubjectRelations_Call) RunAndReturn

type AuthzRepository_DeleteV2_Call

type AuthzRepository_DeleteV2_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_DeleteV2_Call) Return

func (*AuthzRepository_DeleteV2_Call) Run

func (*AuthzRepository_DeleteV2_Call) RunAndReturn

type AuthzRepository_Expecter

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

func (*AuthzRepository_Expecter) Add

func (_e *AuthzRepository_Expecter) Add(ctx interface{}, rel interface{}) *AuthzRepository_Add_Call

Add is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

func (*AuthzRepository_Expecter) AddV2

func (_e *AuthzRepository_Expecter) AddV2(ctx interface{}, rel interface{}) *AuthzRepository_AddV2_Call

AddV2 is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.RelationV2

func (*AuthzRepository_Expecter) BulkCheck

func (_e *AuthzRepository_Expecter) BulkCheck(ctx interface{}, rels interface{}, acts interface{}) *AuthzRepository_BulkCheck_Call

BulkCheck is a helper method to define mock.On call

  • ctx context.Context
  • rels []relation.Relation
  • acts []action.Action

func (*AuthzRepository_Expecter) Check

func (_e *AuthzRepository_Expecter) Check(ctx interface{}, rel interface{}, act interface{}) *AuthzRepository_Check_Call

Check is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation
  • act action.Action

func (*AuthzRepository_Expecter) CheckIsPublic added in v0.6.31

func (_e *AuthzRepository_Expecter) CheckIsPublic(ctx interface{}, rel interface{}, act interface{}) *AuthzRepository_CheckIsPublic_Call

CheckIsPublic is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation
  • act action.Action

func (*AuthzRepository_Expecter) DeleteSubjectRelations

func (_e *AuthzRepository_Expecter) DeleteSubjectRelations(ctx interface{}, resourceType interface{}, optionalResourceID interface{}) *AuthzRepository_DeleteSubjectRelations_Call

DeleteSubjectRelations is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string
  • optionalResourceID string

func (*AuthzRepository_Expecter) DeleteV2

func (_e *AuthzRepository_Expecter) DeleteV2(ctx interface{}, rel interface{}) *AuthzRepository_DeleteV2_Call

DeleteV2 is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.RelationV2

func (*AuthzRepository_Expecter) LookupResources

func (_e *AuthzRepository_Expecter) LookupResources(ctx interface{}, resourceType interface{}, permission interface{}, subjectType interface{}, subjectID interface{}) *AuthzRepository_LookupResources_Call

LookupResources is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string
  • permission string
  • subjectType string
  • subjectID string

type AuthzRepository_LookupResources_Call

type AuthzRepository_LookupResources_Call struct {
	*mock.Call
}

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

func (*AuthzRepository_LookupResources_Call) Return

func (*AuthzRepository_LookupResources_Call) Run

func (_c *AuthzRepository_LookupResources_Call) Run(run func(ctx context.Context, resourceType string, permission string, subjectType string, subjectID string)) *AuthzRepository_LookupResources_Call

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

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

func (*Repository) DeleteByID

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

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

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) Get

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

func (*Repository) GetByFields

func (_m *Repository) GetByFields(ctx context.Context, rel relation.RelationV2) (relation.RelationV2, error)

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

func (*Repository) List

func (_m *Repository) List(ctx context.Context) ([]relation.RelationV2, error)

List provides a mock function with given fields: ctx

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, toUpdate relation.Relation) (relation.Relation, error)

Update 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_DeleteByID_Call

type Repository_DeleteByID_Call struct {
	*mock.Call
}

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

func (*Repository_DeleteByID_Call) Return

func (*Repository_DeleteByID_Call) Run

func (*Repository_DeleteByID_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{}, _a1 interface{}) *Repository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • _a1 relation.RelationV2

func (*Repository_Expecter) DeleteByID

func (_e *Repository_Expecter) DeleteByID(ctx interface{}, id interface{}) *Repository_DeleteByID_Call

DeleteByID 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) GetByFields

func (_e *Repository_Expecter) GetByFields(ctx interface{}, rel interface{}) *Repository_GetByFields_Call

GetByFields is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.RelationV2

func (*Repository_Expecter) List

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

List is a helper method to define mock.On call

  • ctx context.Context

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 relation.Relation

type Repository_GetByFields_Call

type Repository_GetByFields_Call struct {
	*mock.Call
}

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

func (*Repository_GetByFields_Call) Return

func (*Repository_GetByFields_Call) Run

func (*Repository_GetByFields_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 (*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_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 (_c *Repository_List_Call) Run(run func(ctx context.Context)) *Repository_List_Call

func (*Repository_List_Call) RunAndReturn

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

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

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

Jump to

Keyboard shortcuts

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