Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID uint `json:"id"` Name string `json:"name"` Password string `json:"password"` PhoneNumber string `json:"phone_number"` Email string `json:"email"` BirthDate time.Time `json:"birth_date" ` About string `json:"about"` Job string `json:"job"` ProvinceID string `json:"province_id"` CityID string `json:"city_id"` Province *provDom.Province `json:"province"` City *cityDom.City `json:"city"` IsAdmin bool `json:"is_admin"` }
User is a struct that represents the User account.
type UserRepository ¶
type UserRepository interface { // GetByID returns the User with the specified ID. GetByID(ctx context.Context, id uint) (*User, error) // Update updates the User with the specified ID. Update(ctx context.Context, user *User) error // IsAdmin checks if the User with the specified ID is an admin. IsAdmin(ctx context.Context, id uint) (bool, error) }
UserRepository is an interface that provides access to the User storage.
type UserUsecase ¶
type UserUsecase interface { // GetByID returns the User with the specified ID. GetByID(ctx context.Context, id uint) (*User, error) // Update updates the User with the specified ID. Update(ctx context.Context, user *User) error }
UserUsecase is an interface that provides business logic for User.
Click to show internal directories.
Click to hide internal directories.