service

package
v0.0.0-...-63192da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeProfile

func ChangeProfile(profile *model.Profile, uid string) error

func CheckPasswordFormat

func CheckPasswordFormat(password string) bool

password can just contain ascii character

func CheckToken

func CheckToken(ctx *gin.Context, key, token string) bool

func CheckVerifyCode

func CheckVerifyCode(ctx *gin.Context, ticket, code, flag string) error

func CreateUserAndProfile

func CreateUserAndProfile(email string, password string) error

func DealWithFrozenImage

func DealWithFrozenImage(ctx *gin.Context, checkRes *model.CheckRes) error

func GetProfileInfo

func GetProfileInfo(uid string) (*model.Profile, error)

func GetProfileOrg

func GetProfileOrg(OrgId int) (string, string, error)

func GetUserByGithubId

func GetUserByGithubId(githubId string) (*model.User, error)

func GetUserInfoFromGithub

func GetUserInfoFromGithub(username, githubId string) (*model.User, error)

func Login

func Login(username string, password string) (string, error)

func ModifyPassword

func ModifyPassword(ctx *gin.Context, username, oldPassword, newPassword string) error

func OauthUserInfo

func OauthUserInfo(userID string) (*model.User, error)

func ResetPassword

func ResetPassword(username, newPassword string) error

func SendEmail

func SendEmail(ctx *gin.Context, username, ticket, title string) error

func SentMsgToBot

func SentMsgToBot(checkRes *model.CheckRes) error

func UpdateUserGitHubId

func UpdateUserGitHubId(username, githubId string) error

func UploadAvatar

func UploadAvatar(avatar *multipart.FileHeader, uid string, ctx *gin.Context) (string, error)

func UserInfo

func UserInfo(ctx *gin.Context) (*model.User, error)

func VerifyAccount

func VerifyAccount(ctx *gin.Context, username, flag string) (string, error)

In VerifyAccountRegister and VerifyAccountResetPWD, the username must be email In VerifyAccountLogin, the username can be email or uid

func VerifyAccountLogin

func VerifyAccountLogin(ctx *gin.Context, username string) (string, error)

This function is used to verify the user's email is exist or not when login This username is email or uid

func VerifyAccountRegister

func VerifyAccountRegister(ctx *gin.Context, username string) (string, error)

This function is used to verify the user's email is exist or not when register This username is email

func VerifyAccountResetPWD

func VerifyAccountResetPWD(ctx *gin.Context, username string) (string, error)

This username is email

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL