Documentation ¶
Index ¶
- type ActivityService
- type ActivityService_Expecter
- type ActivityService_Log_Call
- type AuthzRepository
- func (_m *AuthzRepository) Add(ctx context.Context, rel relation.Relation) error
- func (_m *AuthzRepository) AddV2(ctx context.Context, rel relation.RelationV2) error
- func (_m *AuthzRepository) BulkCheck(ctx context.Context, rels []relation.Relation, acts []action.Action) ([]relation.Permission, error)
- func (_m *AuthzRepository) Check(ctx context.Context, rel relation.Relation, act action.Action) (bool, error)
- func (_m *AuthzRepository) CheckIsPublic(ctx context.Context, rel relation.Relation, act action.Action) (bool, error)
- func (_m *AuthzRepository) DeleteSubjectRelations(ctx context.Context, resourceType string, optionalResourceID string) error
- func (_m *AuthzRepository) DeleteV2(ctx context.Context, rel relation.RelationV2) error
- func (_m *AuthzRepository) EXPECT() *AuthzRepository_Expecter
- func (_m *AuthzRepository) LookupResources(ctx context.Context, resourceType string, permission string, ...) ([]string, error)
- type AuthzRepository_AddV2_Call
- func (_c *AuthzRepository_AddV2_Call) Return(_a0 error) *AuthzRepository_AddV2_Call
- func (_c *AuthzRepository_AddV2_Call) Run(run func(ctx context.Context, rel relation.RelationV2)) *AuthzRepository_AddV2_Call
- func (_c *AuthzRepository_AddV2_Call) RunAndReturn(run func(context.Context, relation.RelationV2) error) *AuthzRepository_AddV2_Call
- type AuthzRepository_Add_Call
- func (_c *AuthzRepository_Add_Call) Return(_a0 error) *AuthzRepository_Add_Call
- func (_c *AuthzRepository_Add_Call) Run(run func(ctx context.Context, rel relation.Relation)) *AuthzRepository_Add_Call
- func (_c *AuthzRepository_Add_Call) RunAndReturn(run func(context.Context, relation.Relation) error) *AuthzRepository_Add_Call
- type AuthzRepository_BulkCheck_Call
- func (_c *AuthzRepository_BulkCheck_Call) Return(_a0 []relation.Permission, _a1 error) *AuthzRepository_BulkCheck_Call
- func (_c *AuthzRepository_BulkCheck_Call) Run(run func(ctx context.Context, rels []relation.Relation, acts []action.Action)) *AuthzRepository_BulkCheck_Call
- func (_c *AuthzRepository_BulkCheck_Call) RunAndReturn(...) *AuthzRepository_BulkCheck_Call
- type AuthzRepository_CheckIsPublic_Call
- func (_c *AuthzRepository_CheckIsPublic_Call) Return(_a0 bool, _a1 error) *AuthzRepository_CheckIsPublic_Call
- func (_c *AuthzRepository_CheckIsPublic_Call) Run(run func(ctx context.Context, rel relation.Relation, act action.Action)) *AuthzRepository_CheckIsPublic_Call
- func (_c *AuthzRepository_CheckIsPublic_Call) RunAndReturn(run func(context.Context, relation.Relation, action.Action) (bool, error)) *AuthzRepository_CheckIsPublic_Call
- type AuthzRepository_Check_Call
- func (_c *AuthzRepository_Check_Call) Return(_a0 bool, _a1 error) *AuthzRepository_Check_Call
- func (_c *AuthzRepository_Check_Call) Run(run func(ctx context.Context, rel relation.Relation, act action.Action)) *AuthzRepository_Check_Call
- func (_c *AuthzRepository_Check_Call) RunAndReturn(run func(context.Context, relation.Relation, action.Action) (bool, error)) *AuthzRepository_Check_Call
- type AuthzRepository_DeleteSubjectRelations_Call
- func (_c *AuthzRepository_DeleteSubjectRelations_Call) Return(_a0 error) *AuthzRepository_DeleteSubjectRelations_Call
- func (_c *AuthzRepository_DeleteSubjectRelations_Call) Run(run func(ctx context.Context, resourceType string, optionalResourceID string)) *AuthzRepository_DeleteSubjectRelations_Call
- func (_c *AuthzRepository_DeleteSubjectRelations_Call) RunAndReturn(run func(context.Context, string, string) error) *AuthzRepository_DeleteSubjectRelations_Call
- type AuthzRepository_DeleteV2_Call
- func (_c *AuthzRepository_DeleteV2_Call) Return(_a0 error) *AuthzRepository_DeleteV2_Call
- func (_c *AuthzRepository_DeleteV2_Call) Run(run func(ctx context.Context, rel relation.RelationV2)) *AuthzRepository_DeleteV2_Call
- func (_c *AuthzRepository_DeleteV2_Call) RunAndReturn(run func(context.Context, relation.RelationV2) error) *AuthzRepository_DeleteV2_Call
- type AuthzRepository_Expecter
- func (_e *AuthzRepository_Expecter) Add(ctx interface{}, rel interface{}) *AuthzRepository_Add_Call
- func (_e *AuthzRepository_Expecter) AddV2(ctx interface{}, rel interface{}) *AuthzRepository_AddV2_Call
- func (_e *AuthzRepository_Expecter) BulkCheck(ctx interface{}, rels interface{}, acts interface{}) *AuthzRepository_BulkCheck_Call
- func (_e *AuthzRepository_Expecter) Check(ctx interface{}, rel interface{}, act interface{}) *AuthzRepository_Check_Call
- func (_e *AuthzRepository_Expecter) CheckIsPublic(ctx interface{}, rel interface{}, act interface{}) *AuthzRepository_CheckIsPublic_Call
- func (_e *AuthzRepository_Expecter) DeleteSubjectRelations(ctx interface{}, resourceType interface{}, optionalResourceID interface{}) *AuthzRepository_DeleteSubjectRelations_Call
- func (_e *AuthzRepository_Expecter) DeleteV2(ctx interface{}, rel interface{}) *AuthzRepository_DeleteV2_Call
- func (_e *AuthzRepository_Expecter) LookupResources(ctx interface{}, resourceType interface{}, permission interface{}, ...) *AuthzRepository_LookupResources_Call
- type AuthzRepository_LookupResources_Call
- func (_c *AuthzRepository_LookupResources_Call) Return(_a0 []string, _a1 error) *AuthzRepository_LookupResources_Call
- func (_c *AuthzRepository_LookupResources_Call) Run(run func(ctx context.Context, resourceType string, permission string, ...)) *AuthzRepository_LookupResources_Call
- func (_c *AuthzRepository_LookupResources_Call) RunAndReturn(run func(context.Context, string, string, string, string) ([]string, error)) *AuthzRepository_LookupResources_Call
- type Repository
- func (_m *Repository) Create(ctx context.Context, _a1 relation.RelationV2) (relation.RelationV2, error)
- func (_m *Repository) DeleteByID(ctx context.Context, id string) error
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) Get(ctx context.Context, id string) (relation.RelationV2, error)
- func (_m *Repository) GetByFields(ctx context.Context, rel relation.RelationV2) (relation.RelationV2, error)
- func (_m *Repository) List(ctx context.Context) ([]relation.RelationV2, error)
- func (_m *Repository) Update(ctx context.Context, toUpdate relation.Relation) (relation.Relation, error)
- type Repository_Create_Call
- func (_c *Repository_Create_Call) Return(_a0 relation.RelationV2, _a1 error) *Repository_Create_Call
- func (_c *Repository_Create_Call) Run(run func(ctx context.Context, _a1 relation.RelationV2)) *Repository_Create_Call
- func (_c *Repository_Create_Call) RunAndReturn(run func(context.Context, relation.RelationV2) (relation.RelationV2, error)) *Repository_Create_Call
- type Repository_DeleteByID_Call
- func (_c *Repository_DeleteByID_Call) Return(_a0 error) *Repository_DeleteByID_Call
- func (_c *Repository_DeleteByID_Call) Run(run func(ctx context.Context, id string)) *Repository_DeleteByID_Call
- func (_c *Repository_DeleteByID_Call) RunAndReturn(run func(context.Context, string) error) *Repository_DeleteByID_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Create(ctx interface{}, _a1 interface{}) *Repository_Create_Call
- func (_e *Repository_Expecter) DeleteByID(ctx interface{}, id interface{}) *Repository_DeleteByID_Call
- func (_e *Repository_Expecter) Get(ctx interface{}, id interface{}) *Repository_Get_Call
- func (_e *Repository_Expecter) GetByFields(ctx interface{}, rel interface{}) *Repository_GetByFields_Call
- func (_e *Repository_Expecter) List(ctx interface{}) *Repository_List_Call
- func (_e *Repository_Expecter) Update(ctx interface{}, toUpdate interface{}) *Repository_Update_Call
- type Repository_GetByFields_Call
- func (_c *Repository_GetByFields_Call) Return(_a0 relation.RelationV2, _a1 error) *Repository_GetByFields_Call
- func (_c *Repository_GetByFields_Call) Run(run func(ctx context.Context, rel relation.RelationV2)) *Repository_GetByFields_Call
- func (_c *Repository_GetByFields_Call) RunAndReturn(run func(context.Context, relation.RelationV2) (relation.RelationV2, error)) *Repository_GetByFields_Call
- type Repository_Get_Call
- func (_c *Repository_Get_Call) Return(_a0 relation.RelationV2, _a1 error) *Repository_Get_Call
- func (_c *Repository_Get_Call) Run(run func(ctx context.Context, id string)) *Repository_Get_Call
- func (_c *Repository_Get_Call) RunAndReturn(run func(context.Context, string) (relation.RelationV2, error)) *Repository_Get_Call
- type Repository_List_Call
- func (_c *Repository_List_Call) Return(_a0 []relation.RelationV2, _a1 error) *Repository_List_Call
- func (_c *Repository_List_Call) Run(run func(ctx context.Context)) *Repository_List_Call
- func (_c *Repository_List_Call) RunAndReturn(run func(context.Context) ([]relation.RelationV2, error)) *Repository_List_Call
- type Repository_Update_Call
- func (_c *Repository_Update_Call) Return(_a0 relation.Relation, _a1 error) *Repository_Update_Call
- func (_c *Repository_Update_Call) Run(run func(ctx context.Context, toUpdate relation.Relation)) *Repository_Update_Call
- func (_c *Repository_Update_Call) RunAndReturn(run func(context.Context, relation.Relation) (relation.Relation, error)) *Repository_Update_Call
- type UserService
- type UserService_Expecter
- type UserService_FetchCurrentUser_Call
- func (_c *UserService_FetchCurrentUser_Call) Return(_a0 user.User, _a1 error) *UserService_FetchCurrentUser_Call
- func (_c *UserService_FetchCurrentUser_Call) Run(run func(ctx context.Context)) *UserService_FetchCurrentUser_Call
- func (_c *UserService_FetchCurrentUser_Call) RunAndReturn(run func(context.Context) (user.User, error)) *UserService_FetchCurrentUser_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityService ¶
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 (_m *ActivityService) EXPECT() *ActivityService_Expecter
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 ¶
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 (_c *ActivityService_Log_Call) Return(_a0 error) *ActivityService_Log_Call
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 ¶
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) AddV2 ¶
func (_m *AuthzRepository) AddV2(ctx context.Context, rel relation.RelationV2) error
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 (_m *AuthzRepository) EXPECT() *AuthzRepository_Expecter
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 ¶
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 (_c *AuthzRepository_AddV2_Call) Return(_a0 error) *AuthzRepository_AddV2_Call
func (*AuthzRepository_AddV2_Call) Run ¶
func (_c *AuthzRepository_AddV2_Call) Run(run func(ctx context.Context, rel relation.RelationV2)) *AuthzRepository_AddV2_Call
func (*AuthzRepository_AddV2_Call) RunAndReturn ¶
func (_c *AuthzRepository_AddV2_Call) RunAndReturn(run func(context.Context, relation.RelationV2) error) *AuthzRepository_AddV2_Call
type AuthzRepository_Add_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 (_c *AuthzRepository_Add_Call) Return(_a0 error) *AuthzRepository_Add_Call
func (*AuthzRepository_Add_Call) Run ¶
func (_c *AuthzRepository_Add_Call) Run(run func(ctx context.Context, rel relation.Relation)) *AuthzRepository_Add_Call
func (*AuthzRepository_Add_Call) RunAndReturn ¶
func (_c *AuthzRepository_Add_Call) RunAndReturn(run func(context.Context, relation.Relation) error) *AuthzRepository_Add_Call
type AuthzRepository_BulkCheck_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 (_c *AuthzRepository_BulkCheck_Call) Return(_a0 []relation.Permission, _a1 error) *AuthzRepository_BulkCheck_Call
func (*AuthzRepository_BulkCheck_Call) Run ¶
func (_c *AuthzRepository_BulkCheck_Call) Run(run func(ctx context.Context, rels []relation.Relation, acts []action.Action)) *AuthzRepository_BulkCheck_Call
func (*AuthzRepository_BulkCheck_Call) RunAndReturn ¶
func (_c *AuthzRepository_BulkCheck_Call) RunAndReturn(run func(context.Context, []relation.Relation, []action.Action) ([]relation.Permission, error)) *AuthzRepository_BulkCheck_Call
type AuthzRepository_CheckIsPublic_Call ¶ added in v0.6.31
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 (_c *AuthzRepository_CheckIsPublic_Call) Return(_a0 bool, _a1 error) *AuthzRepository_CheckIsPublic_Call
func (*AuthzRepository_CheckIsPublic_Call) Run ¶ added in v0.6.31
func (_c *AuthzRepository_CheckIsPublic_Call) Run(run func(ctx context.Context, rel relation.Relation, act action.Action)) *AuthzRepository_CheckIsPublic_Call
func (*AuthzRepository_CheckIsPublic_Call) RunAndReturn ¶ added in v0.6.31
func (_c *AuthzRepository_CheckIsPublic_Call) RunAndReturn(run func(context.Context, relation.Relation, action.Action) (bool, error)) *AuthzRepository_CheckIsPublic_Call
type AuthzRepository_Check_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 (_c *AuthzRepository_Check_Call) Return(_a0 bool, _a1 error) *AuthzRepository_Check_Call
func (*AuthzRepository_Check_Call) Run ¶
func (_c *AuthzRepository_Check_Call) Run(run func(ctx context.Context, rel relation.Relation, act action.Action)) *AuthzRepository_Check_Call
func (*AuthzRepository_Check_Call) RunAndReturn ¶
func (_c *AuthzRepository_Check_Call) RunAndReturn(run func(context.Context, relation.Relation, action.Action) (bool, error)) *AuthzRepository_Check_Call
type AuthzRepository_DeleteSubjectRelations_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 (_c *AuthzRepository_DeleteSubjectRelations_Call) Return(_a0 error) *AuthzRepository_DeleteSubjectRelations_Call
func (*AuthzRepository_DeleteSubjectRelations_Call) Run ¶
func (_c *AuthzRepository_DeleteSubjectRelations_Call) Run(run func(ctx context.Context, resourceType string, optionalResourceID string)) *AuthzRepository_DeleteSubjectRelations_Call
func (*AuthzRepository_DeleteSubjectRelations_Call) RunAndReturn ¶
func (_c *AuthzRepository_DeleteSubjectRelations_Call) RunAndReturn(run func(context.Context, string, string) error) *AuthzRepository_DeleteSubjectRelations_Call
type AuthzRepository_DeleteV2_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 (_c *AuthzRepository_DeleteV2_Call) Return(_a0 error) *AuthzRepository_DeleteV2_Call
func (*AuthzRepository_DeleteV2_Call) Run ¶
func (_c *AuthzRepository_DeleteV2_Call) Run(run func(ctx context.Context, rel relation.RelationV2)) *AuthzRepository_DeleteV2_Call
func (*AuthzRepository_DeleteV2_Call) RunAndReturn ¶
func (_c *AuthzRepository_DeleteV2_Call) RunAndReturn(run func(context.Context, relation.RelationV2) error) *AuthzRepository_DeleteV2_Call
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 ¶
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 (_c *AuthzRepository_LookupResources_Call) Return(_a0 []string, _a1 error) *AuthzRepository_LookupResources_Call
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 ¶
func (_c *AuthzRepository_LookupResources_Call) RunAndReturn(run func(context.Context, string, string, string, string) ([]string, error)) *AuthzRepository_LookupResources_Call
type Repository ¶
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, _a1 relation.RelationV2) (relation.RelationV2, error)
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 ¶
func (_m *Repository) Get(ctx context.Context, id string) (relation.RelationV2, error)
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
type Repository_Create_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 (_c *Repository_Create_Call) Return(_a0 relation.RelationV2, _a1 error) *Repository_Create_Call
func (*Repository_Create_Call) Run ¶
func (_c *Repository_Create_Call) Run(run func(ctx context.Context, _a1 relation.RelationV2)) *Repository_Create_Call
func (*Repository_Create_Call) RunAndReturn ¶
func (_c *Repository_Create_Call) RunAndReturn(run func(context.Context, relation.RelationV2) (relation.RelationV2, error)) *Repository_Create_Call
type Repository_DeleteByID_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 (_c *Repository_DeleteByID_Call) Return(_a0 error) *Repository_DeleteByID_Call
func (*Repository_DeleteByID_Call) Run ¶
func (_c *Repository_DeleteByID_Call) Run(run func(ctx context.Context, id string)) *Repository_DeleteByID_Call
func (*Repository_DeleteByID_Call) RunAndReturn ¶
func (_c *Repository_DeleteByID_Call) RunAndReturn(run func(context.Context, string) error) *Repository_DeleteByID_Call
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 ¶
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 (_c *Repository_GetByFields_Call) Return(_a0 relation.RelationV2, _a1 error) *Repository_GetByFields_Call
func (*Repository_GetByFields_Call) Run ¶
func (_c *Repository_GetByFields_Call) Run(run func(ctx context.Context, rel relation.RelationV2)) *Repository_GetByFields_Call
func (*Repository_GetByFields_Call) RunAndReturn ¶
func (_c *Repository_GetByFields_Call) RunAndReturn(run func(context.Context, relation.RelationV2) (relation.RelationV2, error)) *Repository_GetByFields_Call
type Repository_Get_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 relation.RelationV2, _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) (relation.RelationV2, error)) *Repository_Get_Call
type Repository_List_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 []relation.RelationV2, _a1 error) *Repository_List_Call
func (*Repository_List_Call) Run ¶
func (_c *Repository_List_Call) Run(run func(ctx context.Context)) *Repository_List_Call
func (*Repository_List_Call) RunAndReturn ¶
func (_c *Repository_List_Call) RunAndReturn(run func(context.Context) ([]relation.RelationV2, error)) *Repository_List_Call
type Repository_Update_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 (_c *Repository_Update_Call) Return(_a0 relation.Relation, _a1 error) *Repository_Update_Call
func (*Repository_Update_Call) Run ¶
func (_c *Repository_Update_Call) Run(run func(ctx context.Context, toUpdate relation.Relation)) *Repository_Update_Call
func (*Repository_Update_Call) RunAndReturn ¶
func (_c *Repository_Update_Call) RunAndReturn(run func(context.Context, relation.Relation) (relation.Relation, error)) *Repository_Update_Call
type UserService ¶
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 ¶
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 ¶
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 (_c *UserService_FetchCurrentUser_Call) Return(_a0 user.User, _a1 error) *UserService_FetchCurrentUser_Call
func (*UserService_FetchCurrentUser_Call) Run ¶
func (_c *UserService_FetchCurrentUser_Call) Run(run func(ctx context.Context)) *UserService_FetchCurrentUser_Call
func (*UserService_FetchCurrentUser_Call) RunAndReturn ¶
func (_c *UserService_FetchCurrentUser_Call) RunAndReturn(run func(context.Context) (user.User, error)) *UserService_FetchCurrentUser_Call