Documentation
¶
Index ¶
- type UserRepositoryMock
- func (_m *UserRepositoryMock) Authenticate(ctx context.Context, email string, password string) (*ent.User, error)
- func (_m *UserRepositoryMock) EXPECT() *UserRepositoryMock_Expecter
- func (_m *UserRepositoryMock) GetByEmail(ctx context.Context, email string) (*ent.User, error)
- func (_m *UserRepositoryMock) GetByID(ctx context.Context, id uuid.UUID) (*ent.User, error)
- func (_m *UserRepositoryMock) GetGroups(ctx context.Context, userID uuid.UUID) ([]*ent.Group, error)
- func (_m *UserRepositoryMock) GetOrCreate(ctx context.Context, email string) (*ent.User, error)
- type UserRepositoryMock_Authenticate_Call
- func (_c *UserRepositoryMock_Authenticate_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_Authenticate_Call
- func (_c *UserRepositoryMock_Authenticate_Call) Run(run func(ctx context.Context, email string, password string)) *UserRepositoryMock_Authenticate_Call
- func (_c *UserRepositoryMock_Authenticate_Call) RunAndReturn(run func(context.Context, string, string) (*ent.User, error)) *UserRepositoryMock_Authenticate_Call
- type UserRepositoryMock_Expecter
- func (_e *UserRepositoryMock_Expecter) Authenticate(ctx interface{}, email interface{}, password interface{}) *UserRepositoryMock_Authenticate_Call
- func (_e *UserRepositoryMock_Expecter) GetByEmail(ctx interface{}, email interface{}) *UserRepositoryMock_GetByEmail_Call
- func (_e *UserRepositoryMock_Expecter) GetByID(ctx interface{}, id interface{}) *UserRepositoryMock_GetByID_Call
- func (_e *UserRepositoryMock_Expecter) GetGroups(ctx interface{}, userID interface{}) *UserRepositoryMock_GetGroups_Call
- func (_e *UserRepositoryMock_Expecter) GetOrCreate(ctx interface{}, email interface{}) *UserRepositoryMock_GetOrCreate_Call
- type UserRepositoryMock_GetByEmail_Call
- func (_c *UserRepositoryMock_GetByEmail_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_GetByEmail_Call
- func (_c *UserRepositoryMock_GetByEmail_Call) Run(run func(ctx context.Context, email string)) *UserRepositoryMock_GetByEmail_Call
- func (_c *UserRepositoryMock_GetByEmail_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *UserRepositoryMock_GetByEmail_Call
- type UserRepositoryMock_GetByID_Call
- func (_c *UserRepositoryMock_GetByID_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_GetByID_Call
- func (_c *UserRepositoryMock_GetByID_Call) Run(run func(ctx context.Context, id uuid.UUID)) *UserRepositoryMock_GetByID_Call
- func (_c *UserRepositoryMock_GetByID_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*ent.User, error)) *UserRepositoryMock_GetByID_Call
- type UserRepositoryMock_GetGroups_Call
- func (_c *UserRepositoryMock_GetGroups_Call) Return(_a0 []*ent.Group, _a1 error) *UserRepositoryMock_GetGroups_Call
- func (_c *UserRepositoryMock_GetGroups_Call) Run(run func(ctx context.Context, userID uuid.UUID)) *UserRepositoryMock_GetGroups_Call
- func (_c *UserRepositoryMock_GetGroups_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*ent.Group, error)) *UserRepositoryMock_GetGroups_Call
- type UserRepositoryMock_GetOrCreate_Call
- func (_c *UserRepositoryMock_GetOrCreate_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_GetOrCreate_Call
- func (_c *UserRepositoryMock_GetOrCreate_Call) Run(run func(ctx context.Context, email string)) *UserRepositoryMock_GetOrCreate_Call
- func (_c *UserRepositoryMock_GetOrCreate_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *UserRepositoryMock_GetOrCreate_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepositoryMock ¶
UserRepositoryMock is an autogenerated mock type for the UserRepositoryInterface type
func NewUserRepositoryMock ¶
func NewUserRepositoryMock(t interface { mock.TestingT Cleanup(func()) }) *UserRepositoryMock
NewUserRepositoryMock creates a new instance of UserRepositoryMock. 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 (*UserRepositoryMock) Authenticate ¶
func (_m *UserRepositoryMock) Authenticate(ctx context.Context, email string, password string) (*ent.User, error)
Authenticate provides a mock function with given fields: ctx, email, password
func (*UserRepositoryMock) EXPECT ¶
func (_m *UserRepositoryMock) EXPECT() *UserRepositoryMock_Expecter
func (*UserRepositoryMock) GetByEmail ¶
GetByEmail provides a mock function with given fields: ctx, email
func (*UserRepositoryMock) GetGroups ¶
func (_m *UserRepositoryMock) GetGroups(ctx context.Context, userID uuid.UUID) ([]*ent.Group, error)
GetGroups provides a mock function with given fields: ctx, userID
func (*UserRepositoryMock) GetOrCreate ¶
GetOrCreate provides a mock function with given fields: ctx, email
type UserRepositoryMock_Authenticate_Call ¶
UserRepositoryMock_Authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authenticate'
func (*UserRepositoryMock_Authenticate_Call) Return ¶
func (_c *UserRepositoryMock_Authenticate_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_Authenticate_Call
func (*UserRepositoryMock_Authenticate_Call) Run ¶
func (_c *UserRepositoryMock_Authenticate_Call) Run(run func(ctx context.Context, email string, password string)) *UserRepositoryMock_Authenticate_Call
func (*UserRepositoryMock_Authenticate_Call) RunAndReturn ¶
func (_c *UserRepositoryMock_Authenticate_Call) RunAndReturn(run func(context.Context, string, string) (*ent.User, error)) *UserRepositoryMock_Authenticate_Call
type UserRepositoryMock_Expecter ¶
type UserRepositoryMock_Expecter struct {
// contains filtered or unexported fields
}
func (*UserRepositoryMock_Expecter) Authenticate ¶
func (_e *UserRepositoryMock_Expecter) Authenticate(ctx interface{}, email interface{}, password interface{}) *UserRepositoryMock_Authenticate_Call
Authenticate is a helper method to define mock.On call
- ctx context.Context
- email string
- password string
func (*UserRepositoryMock_Expecter) GetByEmail ¶
func (_e *UserRepositoryMock_Expecter) GetByEmail(ctx interface{}, email interface{}) *UserRepositoryMock_GetByEmail_Call
GetByEmail is a helper method to define mock.On call
- ctx context.Context
- email string
func (*UserRepositoryMock_Expecter) GetByID ¶
func (_e *UserRepositoryMock_Expecter) GetByID(ctx interface{}, id interface{}) *UserRepositoryMock_GetByID_Call
GetByID is a helper method to define mock.On call
- ctx context.Context
- id uuid.UUID
func (*UserRepositoryMock_Expecter) GetGroups ¶
func (_e *UserRepositoryMock_Expecter) GetGroups(ctx interface{}, userID interface{}) *UserRepositoryMock_GetGroups_Call
GetGroups is a helper method to define mock.On call
- ctx context.Context
- userID uuid.UUID
func (*UserRepositoryMock_Expecter) GetOrCreate ¶
func (_e *UserRepositoryMock_Expecter) GetOrCreate(ctx interface{}, email interface{}) *UserRepositoryMock_GetOrCreate_Call
GetOrCreate is a helper method to define mock.On call
- ctx context.Context
- email string
type UserRepositoryMock_GetByEmail_Call ¶
UserRepositoryMock_GetByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByEmail'
func (*UserRepositoryMock_GetByEmail_Call) Return ¶
func (_c *UserRepositoryMock_GetByEmail_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_GetByEmail_Call
func (*UserRepositoryMock_GetByEmail_Call) Run ¶
func (_c *UserRepositoryMock_GetByEmail_Call) Run(run func(ctx context.Context, email string)) *UserRepositoryMock_GetByEmail_Call
func (*UserRepositoryMock_GetByEmail_Call) RunAndReturn ¶
func (_c *UserRepositoryMock_GetByEmail_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *UserRepositoryMock_GetByEmail_Call
type UserRepositoryMock_GetByID_Call ¶
UserRepositoryMock_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID'
func (*UserRepositoryMock_GetByID_Call) Return ¶
func (_c *UserRepositoryMock_GetByID_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_GetByID_Call
func (*UserRepositoryMock_GetByID_Call) Run ¶
func (_c *UserRepositoryMock_GetByID_Call) Run(run func(ctx context.Context, id uuid.UUID)) *UserRepositoryMock_GetByID_Call
func (*UserRepositoryMock_GetByID_Call) RunAndReturn ¶
func (_c *UserRepositoryMock_GetByID_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*ent.User, error)) *UserRepositoryMock_GetByID_Call
type UserRepositoryMock_GetGroups_Call ¶
UserRepositoryMock_GetGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroups'
func (*UserRepositoryMock_GetGroups_Call) Return ¶
func (_c *UserRepositoryMock_GetGroups_Call) Return(_a0 []*ent.Group, _a1 error) *UserRepositoryMock_GetGroups_Call
func (*UserRepositoryMock_GetGroups_Call) Run ¶
func (_c *UserRepositoryMock_GetGroups_Call) Run(run func(ctx context.Context, userID uuid.UUID)) *UserRepositoryMock_GetGroups_Call
func (*UserRepositoryMock_GetGroups_Call) RunAndReturn ¶
func (_c *UserRepositoryMock_GetGroups_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*ent.Group, error)) *UserRepositoryMock_GetGroups_Call
type UserRepositoryMock_GetOrCreate_Call ¶
UserRepositoryMock_GetOrCreate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrCreate'
func (*UserRepositoryMock_GetOrCreate_Call) Return ¶
func (_c *UserRepositoryMock_GetOrCreate_Call) Return(_a0 *ent.User, _a1 error) *UserRepositoryMock_GetOrCreate_Call
func (*UserRepositoryMock_GetOrCreate_Call) Run ¶
func (_c *UserRepositoryMock_GetOrCreate_Call) Run(run func(ctx context.Context, email string)) *UserRepositoryMock_GetOrCreate_Call
func (*UserRepositoryMock_GetOrCreate_Call) RunAndReturn ¶
func (_c *UserRepositoryMock_GetOrCreate_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *UserRepositoryMock_GetOrCreate_Call