Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { GetAll(ctx context.Context) (*[]User, error) GetOne(ctx context.Context, id uint) (*User, error) GetByUsername(ctx context.Context, username string) (*User, error) Create(ctx context.Context, user User) (*User, error) Update(ctx context.Context, id uint, user User) (*User, error) Delete(ctx context.Context, id uint) error }
Repository handle the CRUD operations with Users.
type User ¶
type User struct { ID uint `json:"id,omitempty" example:"1"` FirstName string `json:"first_name,omitempty" example:"Matias"` LastName string `json:"last_name,omitempty" example:"Lamela"` Username string `json:"username,omitempty" example:"escalera92"` Email string `json:"email,omitempty" example:"matiaslamela1992@gmail.com"` Picture string `` /* 139-byte string literal not displayed */ Password string `json:"password,omitempty" example:"1234"` PasswordHash string `json:"-"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
func (*User) HashPassword ¶
func (*User) PasswordMatch ¶
Click to show internal directories.
Click to hide internal directories.