Documentation
¶
Index ¶
- type User
- type Users
- func (u *Users) Check(user User) (bool, error)
- func (u *Users) CheckByUsernameAndPassword(username, password string) (User, error)
- func (u *Users) CheckStatus(id int) (bool, error)
- func (u *Users) Delete(id int) error
- func (u *Users) Insert(user *User) error
- func (u *Users) Login(w http.ResponseWriter, r *http.Request)
- func (u *Users) LoginSession(w http.ResponseWriter, r *http.Request)
- func (u *Users) SearchByEmail(email string) (User, error)
- func (u *Users) SearchByID(id int) (User, error)
- func (u *Users) Update(user *User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
ID int `json:"id"`
GroupID int `json:"group_id"`
Username string `json:"username"`
Password string `json:"password"`
Email string `json:"email"`
Phone string `json:"phone"`
Contact string `json:"contact"`
EncryteToken string `json:"encryte_token"`
Status int `json:"status"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type Users ¶
type Users struct {
EnableTPA bool
// contains filtered or unexported fields
}
func (*Users) CheckByUsernameAndPassword ¶
func (*Users) LoginSession ¶
func (u *Users) LoginSession(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.