Documentation
¶
Index ¶
- type UserExternalLoginRepo
- type UserExternalLoginService
- func (us *UserExternalLoginService) ExternalLogin(ctx context.Context, externalUserInfo *schema.ExternalLoginUserInfoCache) (resp *schema.UserExternalLoginResp, err error)
- func (us *UserExternalLoginService) ExternalLoginBindingUser(ctx context.Context, bindingKey string, oldUserInfo *entity.User) (err error)
- func (us *UserExternalLoginService) ExternalLoginBindingUserSendEmail(ctx context.Context, req *schema.ExternalLoginBindingUserSendEmailReq) (resp *schema.ExternalLoginBindingUserSendEmailResp, err error)
- func (us *UserExternalLoginService) ExternalLoginUnbinding(ctx context.Context, req *schema.ExternalLoginUnbindingReq) (resp any, err error)
- func (us *UserExternalLoginService) GetExternalLoginUserInfoList(ctx context.Context, userID string) (resp []*entity.UserExternalLogin, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserExternalLoginRepo ¶
type UserExternalLoginRepo interface {
AddUserExternalLogin(ctx context.Context, user *entity.UserExternalLogin) (err error)
UpdateInfo(ctx context.Context, userInfo *entity.UserExternalLogin) (err error)
GetByExternalID(ctx context.Context, externalID string) (userInfo *entity.UserExternalLogin, exist bool, err error)
GetUserExternalLoginList(ctx context.Context, userID string) (
resp []*entity.UserExternalLogin, err error)
DeleteUserExternalLogin(ctx context.Context, userID, externalID string) (err error)
SetCacheUserExternalLoginInfo(ctx context.Context, key string, info *schema.ExternalLoginUserInfoCache) (err error)
GetCacheUserExternalLoginInfo(ctx context.Context, key string) (info *schema.ExternalLoginUserInfoCache, err error)
}
type UserExternalLoginService ¶
type UserExternalLoginService struct {
// contains filtered or unexported fields
}
UserExternalLoginService user external login service
func NewUserExternalLoginService ¶
func NewUserExternalLoginService( userRepo usercommon.UserRepo, userCommonService *usercommon.UserCommon, userExternalLoginRepo UserExternalLoginRepo, emailService *export.EmailService, siteInfoCommonService *siteinfo_common.SiteInfoCommonService, userActivity activity.UserActiveActivityRepo, ) *UserExternalLoginService
NewUserExternalLoginService new user external login service
func (*UserExternalLoginService) ExternalLogin ¶
func (us *UserExternalLoginService) ExternalLogin( ctx context.Context, externalUserInfo *schema.ExternalLoginUserInfoCache) ( resp *schema.UserExternalLoginResp, err error)
ExternalLogin if user is already a member logged in
func (*UserExternalLoginService) ExternalLoginBindingUser ¶
func (us *UserExternalLoginService) ExternalLoginBindingUser( ctx context.Context, bindingKey string, oldUserInfo *entity.User) (err error)
ExternalLoginBindingUser The user clicks on the email link of the bound account and requests the API to bind the user officially
func (*UserExternalLoginService) ExternalLoginBindingUserSendEmail ¶
func (us *UserExternalLoginService) ExternalLoginBindingUserSendEmail( ctx context.Context, req *schema.ExternalLoginBindingUserSendEmailReq) ( resp *schema.ExternalLoginBindingUserSendEmailResp, err error)
ExternalLoginBindingUserSendEmail Send an email for third-party account login for binding user
func (*UserExternalLoginService) ExternalLoginUnbinding ¶
func (us *UserExternalLoginService) ExternalLoginUnbinding( ctx context.Context, req *schema.ExternalLoginUnbindingReq) (resp any, err error)
ExternalLoginUnbinding external login unbinding
func (*UserExternalLoginService) GetExternalLoginUserInfoList ¶
func (us *UserExternalLoginService) GetExternalLoginUserInfoList( ctx context.Context, userID string) (resp []*entity.UserExternalLogin, err error)
GetExternalLoginUserInfoList get external login user info list
Click to show internal directories.
Click to hide internal directories.