Documentation ¶
Index ¶
- type UserRepository
- func (_m *UserRepository) Create(ctx context.Context, entity interface{}) (string, error)
- func (_m *UserRepository) CreateMany(ctx context.Context, entities []interface{}) ([]string, error)
- func (_m *UserRepository) Delete(ctx context.Context, ID string) error
- func (_m *UserRepository) Get(ctx context.Context, filter map[string]interface{}, skip *int, take *int) ([]interface{}, error)
- func (_m *UserRepository) GetByID(ctx context.Context, ID string) (interface{}, error)
- func (_m *UserRepository) Update(ctx context.Context, ID string, entity interface{}) error
- type UserService
- func (_m *UserService) Create(ctx context.Context, user models.CreateUserReq) (models.CreationResp, error)
- func (_m *UserService) CreateMany(ctx context.Context, users []models.CreateUserReq) (models.MultiCreationResp, error)
- func (_m *UserService) Delete(ctx context.Context, ID string) error
- func (_m *UserService) GetAll(ctx context.Context) ([]models.UserResp, error)
- func (_m *UserService) GetByEmail(ctx context.Context, email string) (models.UserResp, error)
- func (_m *UserService) GetByID(ctx context.Context, ID string) (models.UserResp, error)
- func (_m *UserService) GetUserClaims(ctx context.Context) map[int]string
- func (_m *UserService) Login(ctx context.Context, credentials models.LoginUserReq) (models.LoginUserResp, error)
- func (_m *UserService) Update(ctx context.Context, ID string, user models.UpdateUserReq) error
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 UserRepository type
func NewUserRepository ¶
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) Create ¶
func (_m *UserRepository) Create(ctx context.Context, entity interface{}) (string, error)
Create provides a mock function with given fields: ctx, entity
func (*UserRepository) CreateMany ¶ added in v1.9.0
func (_m *UserRepository) CreateMany(ctx context.Context, entities []interface{}) ([]string, error)
CreateMany provides a mock function with given fields: ctx, entities
func (*UserRepository) Delete ¶
func (_m *UserRepository) Delete(ctx context.Context, ID string) error
Delete provides a mock function with given fields: ctx, ID
func (*UserRepository) Get ¶
func (_m *UserRepository) Get(ctx context.Context, filter map[string]interface{}, skip *int, take *int) ([]interface{}, error)
Get provides a mock function with given fields: ctx, filter, skip, take
type UserService ¶
UserService is an autogenerated mock type for the UserService type
func NewUserService ¶
func NewUserService(t mockConstructorTestingTNewUserService) *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.
func (*UserService) Create ¶
func (_m *UserService) Create(ctx context.Context, user models.CreateUserReq) (models.CreationResp, error)
Create provides a mock function with given fields: ctx, user
func (*UserService) CreateMany ¶ added in v1.9.0
func (_m *UserService) CreateMany(ctx context.Context, users []models.CreateUserReq) (models.MultiCreationResp, error)
CreateMany provides a mock function with given fields: ctx, users
func (*UserService) Delete ¶
func (_m *UserService) Delete(ctx context.Context, ID string) error
Delete provides a mock function with given fields: ctx, ID
func (*UserService) GetByEmail ¶
GetByEmail provides a mock function with given fields: ctx, email
func (*UserService) GetUserClaims ¶ added in v1.9.0
func (_m *UserService) GetUserClaims(ctx context.Context) map[int]string
GetUserClaims provides a mock function with given fields: ctx
func (*UserService) Login ¶
func (_m *UserService) Login(ctx context.Context, credentials models.LoginUserReq) (models.LoginUserResp, error)
Login provides a mock function with given fields: ctx, credentials
func (*UserService) Update ¶
func (_m *UserService) Update(ctx context.Context, ID string, user models.UpdateUserReq) error
Update provides a mock function with given fields: ctx, ID, user