Documentation ¶
Index ¶
- Constants
- type LoginRequest
- type User
- func (user *User) Delete() *errors.RestError
- func (user *User) FindByEmail() *errors.RestError
- func (user *User) Get() *errors.RestError
- func (user *User) GetAll() ([]*User, *errors.RestError)
- func (user *User) Save() *errors.RestError
- func (user *User) Update() *errors.RestError
- func (user *User) Validate() *errors.RestError
Constants ¶
View Source
const (
StatusActive = "active"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginRequest ¶
type LoginRequest struct { Email string `json:"email" sql:"not null;unique"` Password string `json:"password"` }
LoginRequest struct
type User ¶
type User struct { ID int64 `json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `json:"deletedAt"` Status string `json:"status"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email" sql:"not null;unique"` Password string `gorm:"type:varchar(255); not null" json:"password,omitempty"` }
User dto
func (*User) FindByEmail ¶
FindByEmail find user by email
Click to show internal directories.
Click to hide internal directories.