Documentation ¶
Index ¶
- type User
- func (u *User) Create(ctx context.Context, user *model.User) (*model.User, error)
- func (u *User) FindByEmail(ctx context.Context, email string) ([]model.User, error)
- func (u *User) Get(ctx context.Context, id string) (*model.User, error)
- func (u *User) GetByEmail(ctx context.Context, email string) (*model.User, error)
- func (u *User) Update(ctx context.Context, user *model.User) (*model.User, error)
- type UserRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
User repository
func NewUser ¶
func NewUser(cb *gobreaker.CircuitBreaker, db *sqlx.DB) *User
NewUser create new user repository
func (*User) FindByEmail ¶
FindByEmail list users by email
func (*User) GetByEmail ¶
GetByEmail Get user by email
type UserRepo ¶
type UserRepo interface { Create(ctx context.Context, user *model.User) (*model.User, error) Get(ctx context.Context, id string) (*model.User, error) GetByEmail(ctx context.Context, email string) (*model.User, error) FindByEmail(ctx context.Context, email string) ([]model.User, error) Update(ctx context.Context, user *model.User) (*model.User, error) }
UserRepo User repository interface
Click to show internal directories.
Click to hide internal directories.