Documentation
¶
Index ¶
- type UserRepository
- func (_m *UserRepository) Create(ctx context.Context, u *user.User) (string, error)
- func (_m *UserRepository) EXPECT() *UserRepository_Expecter
- func (_m *UserRepository) GetByEmail(ctx context.Context, email string) (user.User, error)
- func (_m *UserRepository) GetOrInsertByEmail(ctx context.Context, u *user.User) (string, error)
- func (_m *UserRepository) InsertByEmail(ctx context.Context, u *user.User) (string, error)
- type UserRepository_Create_Call
- func (_c *UserRepository_Create_Call) Return(_a0 string, _a1 error) *UserRepository_Create_Call
- func (_c *UserRepository_Create_Call) Run(run func(ctx context.Context, u *user.User)) *UserRepository_Create_Call
- func (_c *UserRepository_Create_Call) RunAndReturn(run func(context.Context, *user.User) (string, error)) *UserRepository_Create_Call
- type UserRepository_Expecter
- func (_e *UserRepository_Expecter) Create(ctx interface{}, u interface{}) *UserRepository_Create_Call
- func (_e *UserRepository_Expecter) GetByEmail(ctx interface{}, email interface{}) *UserRepository_GetByEmail_Call
- func (_e *UserRepository_Expecter) GetOrInsertByEmail(ctx interface{}, u interface{}) *UserRepository_GetOrInsertByEmail_Call
- func (_e *UserRepository_Expecter) InsertByEmail(ctx interface{}, u interface{}) *UserRepository_InsertByEmail_Call
- type UserRepository_GetByEmail_Call
- func (_c *UserRepository_GetByEmail_Call) Return(_a0 user.User, _a1 error) *UserRepository_GetByEmail_Call
- func (_c *UserRepository_GetByEmail_Call) Run(run func(ctx context.Context, email string)) *UserRepository_GetByEmail_Call
- func (_c *UserRepository_GetByEmail_Call) RunAndReturn(run func(context.Context, string) (user.User, error)) *UserRepository_GetByEmail_Call
- type UserRepository_GetOrInsertByEmail_Call
- func (_c *UserRepository_GetOrInsertByEmail_Call) Return(_a0 string, _a1 error) *UserRepository_GetOrInsertByEmail_Call
- func (_c *UserRepository_GetOrInsertByEmail_Call) Run(run func(ctx context.Context, u *user.User)) *UserRepository_GetOrInsertByEmail_Call
- func (_c *UserRepository_GetOrInsertByEmail_Call) RunAndReturn(run func(context.Context, *user.User) (string, error)) *UserRepository_GetOrInsertByEmail_Call
- type UserRepository_InsertByEmail_Call
- func (_c *UserRepository_InsertByEmail_Call) Return(_a0 string, _a1 error) *UserRepository_InsertByEmail_Call
- func (_c *UserRepository_InsertByEmail_Call) Run(run func(ctx context.Context, u *user.User)) *UserRepository_InsertByEmail_Call
- func (_c *UserRepository_InsertByEmail_Call) RunAndReturn(run func(context.Context, *user.User) (string, error)) *UserRepository_InsertByEmail_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepository ¶
UserRepository is an autogenerated mock type for the Repository type
func NewUserRepository ¶ added in v0.5.3
func NewUserRepository(t mockConstructorTestingTNewUserRepository) *UserRepository
NewUserRepository creates a new instance of UserRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*UserRepository) EXPECT ¶
func (_m *UserRepository) EXPECT() *UserRepository_Expecter
func (*UserRepository) GetByEmail ¶
GetByEmail provides a mock function with given fields: ctx, email
func (*UserRepository) GetOrInsertByEmail ¶ added in v0.7.11
GetOrInsertByEmail provides a mock function with given fields: ctx, u
func (*UserRepository) InsertByEmail ¶ added in v0.7.11
InsertByEmail provides a mock function with given fields: ctx, u
type UserRepository_Create_Call ¶
UserRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*UserRepository_Create_Call) Return ¶
func (_c *UserRepository_Create_Call) Return(_a0 string, _a1 error) *UserRepository_Create_Call
func (*UserRepository_Create_Call) Run ¶
func (_c *UserRepository_Create_Call) Run(run func(ctx context.Context, u *user.User)) *UserRepository_Create_Call
func (*UserRepository_Create_Call) RunAndReturn ¶ added in v0.5.3
func (_c *UserRepository_Create_Call) RunAndReturn(run func(context.Context, *user.User) (string, error)) *UserRepository_Create_Call
type UserRepository_Expecter ¶
type UserRepository_Expecter struct {
// contains filtered or unexported fields
}
func (*UserRepository_Expecter) Create ¶
func (_e *UserRepository_Expecter) Create(ctx interface{}, u interface{}) *UserRepository_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- u *user.User
func (*UserRepository_Expecter) GetByEmail ¶
func (_e *UserRepository_Expecter) GetByEmail(ctx interface{}, email interface{}) *UserRepository_GetByEmail_Call
GetByEmail is a helper method to define mock.On call
- ctx context.Context
- email string
func (*UserRepository_Expecter) GetOrInsertByEmail ¶ added in v0.7.11
func (_e *UserRepository_Expecter) GetOrInsertByEmail(ctx interface{}, u interface{}) *UserRepository_GetOrInsertByEmail_Call
GetOrInsertByEmail is a helper method to define mock.On call
- ctx context.Context
- u *user.User
func (*UserRepository_Expecter) InsertByEmail ¶ added in v0.7.11
func (_e *UserRepository_Expecter) InsertByEmail(ctx interface{}, u interface{}) *UserRepository_InsertByEmail_Call
InsertByEmail is a helper method to define mock.On call
- ctx context.Context
- u *user.User
type UserRepository_GetByEmail_Call ¶
UserRepository_GetByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByEmail'
func (*UserRepository_GetByEmail_Call) Return ¶
func (_c *UserRepository_GetByEmail_Call) Return(_a0 user.User, _a1 error) *UserRepository_GetByEmail_Call
func (*UserRepository_GetByEmail_Call) Run ¶
func (_c *UserRepository_GetByEmail_Call) Run(run func(ctx context.Context, email string)) *UserRepository_GetByEmail_Call
func (*UserRepository_GetByEmail_Call) RunAndReturn ¶ added in v0.5.3
func (_c *UserRepository_GetByEmail_Call) RunAndReturn(run func(context.Context, string) (user.User, error)) *UserRepository_GetByEmail_Call
type UserRepository_GetOrInsertByEmail_Call ¶ added in v0.7.11
UserRepository_GetOrInsertByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrInsertByEmail'
func (*UserRepository_GetOrInsertByEmail_Call) Return ¶ added in v0.7.11
func (_c *UserRepository_GetOrInsertByEmail_Call) Return(_a0 string, _a1 error) *UserRepository_GetOrInsertByEmail_Call
func (*UserRepository_GetOrInsertByEmail_Call) Run ¶ added in v0.7.11
func (_c *UserRepository_GetOrInsertByEmail_Call) Run(run func(ctx context.Context, u *user.User)) *UserRepository_GetOrInsertByEmail_Call
func (*UserRepository_GetOrInsertByEmail_Call) RunAndReturn ¶ added in v0.7.11
func (_c *UserRepository_GetOrInsertByEmail_Call) RunAndReturn(run func(context.Context, *user.User) (string, error)) *UserRepository_GetOrInsertByEmail_Call
type UserRepository_InsertByEmail_Call ¶ added in v0.7.11
UserRepository_InsertByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertByEmail'
func (*UserRepository_InsertByEmail_Call) Return ¶ added in v0.7.11
func (_c *UserRepository_InsertByEmail_Call) Return(_a0 string, _a1 error) *UserRepository_InsertByEmail_Call
func (*UserRepository_InsertByEmail_Call) Run ¶ added in v0.7.11
func (_c *UserRepository_InsertByEmail_Call) Run(run func(ctx context.Context, u *user.User)) *UserRepository_InsertByEmail_Call
func (*UserRepository_InsertByEmail_Call) RunAndReturn ¶ added in v0.7.11
func (_c *UserRepository_InsertByEmail_Call) RunAndReturn(run func(context.Context, *user.User) (string, error)) *UserRepository_InsertByEmail_Call