Documentation ¶
Index ¶
- func CheckUserEmailExist(email string) int
- func CheckUserGoogleAccountExist(username string) int
- func CheckUserNameExist(username string) int
- func CreateUser(email string, hash_password string, username string) (userModles.UserAccount, error)
- func CreateUserWithGithubLogin(github_email string, github_id string, avatar string) (userModles.UserAccount, error)
- func CreateUserWithGoogleLogin(email string, avatar string, google_id string) (userModles.UserAccount, error)
- func GetUserAvatar(id string) (string, error)
- func GetUserDetil(id string) (userModles.UserDetil, error)
- func Rename(id string, new_name string) (sql.Result, error)
- type OauthData
- type UserAuthData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUserEmailExist ¶
func CheckUserNameExist ¶
func CreateUser ¶
func CreateUser( email string, hash_password string, username string, ) (userModles.UserAccount, error)
func CreateUserWithGithubLogin ¶
func CreateUserWithGithubLogin( github_email string, github_id string, avatar string, ) (userModles.UserAccount, error)
func CreateUserWithGoogleLogin ¶
func CreateUserWithGoogleLogin( email string, avatar string, google_id string, ) (userModles.UserAccount, error)
func GetUserAvatar ¶
func GetUserDetil ¶
func GetUserDetil(id string) (userModles.UserDetil, error)
Types ¶
type OauthData ¶
type OauthData struct { Id string `json:"id"` Email_verify bool `json:"email_verify"` Email_2fa bool `json:"email_2fa"` Phone_2fa bool `json:"phone_2fa"` Totp_2fa bool `json:"totp_2fa"` Totp string `json:"totp"` Default_2fa int `json:"default_2fa"` }
func GetGithubAccount ¶
func GetGoogleAccount ¶
type UserAuthData ¶
type UserAuthData struct { Id string `json:"id"` Password string `json:"password"` Email_verify bool `json:"email_verify"` Email_2fa bool `json:"email_2fa"` Phone_2fa bool `json:"phone_2fa"` Totp_2fa bool `json:"totp_2fa"` Totp string `json:"totp"` Default_2fa int `json:"default_2fa"` }
func GetUserPassword ¶
func GetUserPassword(email string) (UserAuthData, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.