Documentation ¶
Index ¶
- func CreateUserRepo(conn *gorm.DB) users.Repository
- func ToListDomain(data []User) (result []users.Domain)
- type User
- type UserRepo
- func (rep *UserRepo) Create(ctx context.Context, userR *users.Domain) (users.Domain, error)
- func (rep *UserRepo) Delete(ctx context.Context, id int) error
- func (rep *UserRepo) GetAll(ctx context.Context) ([]users.Domain, error)
- func (rep *UserRepo) GetByEmail(ctx context.Context, email string) (users.Domain, error)
- func (rep *UserRepo) GetById(ctx context.Context, id int) (users.Domain, error)
- func (rep *UserRepo) GetByToken(ctx context.Context, token string) (users.Domain, error)
- func (rep *UserRepo) GetByUsername(ctx context.Context, username string) (users.Domain, error)
- func (rep *UserRepo) Login(ctx context.Context, username string, password string) (users.Domain, error)
- func (rep *UserRepo) Update(ctx context.Context, userU users.Domain) (users.Domain, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserRepo ¶
func CreateUserRepo(conn *gorm.DB) users.Repository
func ToListDomain ¶
Types ¶
type User ¶
type User struct { Id int `gorm:"primaryKey"` Name string Username string Password string Email string Address string Status string Token string CreatedAt time.Time UpdatedAt time.Time }
func FromDomain ¶
type UserRepo ¶
func (*UserRepo) GetByEmail ¶
func (*UserRepo) GetByToken ¶
func (*UserRepo) GetByUsername ¶
Click to show internal directories.
Click to hide internal directories.