Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
ID int `json:"id" gorm:"not null;primary"`
FromID int `json:"from"`
ToID int `json:"to"`
Time int64 `json:"time"`
Body string `json:"body"`
Token string `json:"token,omitempty" sql:"-"`
}
Message is a struct of message
type Profile ¶
type Profile struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
UserID int `json:"user_id" gorm:"association_foreignkey:id"`
UserEmail string `json:"user_email"`
About string `json:"about,omitempty"`
}
Profile of user
type User ¶
type User struct {
ID int `json:"id" gorm:"not null;primary key;unique"`
Password string `sql:"-" json:"-"`
UserName string `json:"user_name" sql:"user_name" gorm:"not null;unique"`
Email string `gorm:"not null;unique" json:"email,omitempty"`
EncryptedPassword string `json:"encrypted_password,omitempty"`
JwtToken string `sql:"jwt_token" json:"-"`
}
User a struct of user info
func (*User) BeforeCreate ¶
BeforeCreate a func for create hashed passw
func (*User) ComparePassword ¶
ComparePassword ...
Click to show internal directories.
Click to hide internal directories.