Documentation ¶
Index ¶
- func CreateAndFinal(orgID int64, userID int64, args *ArgsCreateUser)
- func CreateUser(createArgs *UserCore.ArgsCreateUser, args *ArgsCreateUser) (userInfo UserCore.FieldsUserType, errCode string, err error)
- func GetUserPermissions(userID int64) []string
- func GetUserPermissionsByUserInfo(userInfo *UserCore.FieldsUserType) []string
- func LoginByAppleID(orgID int64, authCode string, referrerNationCode, referrerPhone string) (isNewUser bool, userInfo UserCore.FieldsUserType, errCode string, err error)
- type ArgsCreateUser
- type DataGetUserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAndFinal ¶
func CreateAndFinal(orgID int64, userID int64, args *ArgsCreateUser)
CreateAndFinal 外部注册使用内部方法
func CreateUser ¶
func CreateUser(createArgs *UserCore.ArgsCreateUser, args *ArgsCreateUser) (userInfo UserCore.FieldsUserType, errCode string, err error)
CreateUser 创建用户并完成邀请处理等机制的汇总处理
func GetUserPermissions ¶
GetUserPermissions 获取用户登录常用的权限组
func GetUserPermissionsByUserInfo ¶
func GetUserPermissionsByUserInfo(userInfo *UserCore.FieldsUserType) []string
func LoginByAppleID ¶
func LoginByAppleID(orgID int64, authCode string, referrerNationCode, referrerPhone string) (isNewUser bool, userInfo UserCore.FieldsUserType, errCode string, err error)
LoginByAppleID 苹果ID登录机制处理 参考:https://github.com/jmind-systems/go-apple-signin 参考流程设计:https://github.com/tptpp/sign-in-with-apple/blob/master/main.go 参考流程介绍:https://blog.csdn.net/tptpppp/article/details/99288426 参考java实现:https://www.albinwong.com/P7q15vDYQZDBbR0o.html
Types ¶
type ArgsCreateUser ¶
type ArgsCreateUser struct { //注册方式 // phone 手机号注册;admin 后台强制注册; email 邮箱注册 // weixin_wxx 微信小程序授权注册; weixin_wxx_phone 微信小程序授权手机号注册; weixin_app 微信 RegFrom string `json:"regFrom"` //推荐人手机号 ReferrerNationCode string `json:"referrerNationCode" check:"nationCode" empty:"true"` ReferrerPhone string `json:"referrerPhone" check:"phone" empty:"true"` }
ArgsCreateUser 创建用户并完成邀请处理等机制的汇总处理参数
type DataGetUserData ¶
type DataGetUserData struct { //用户ID ID int64 `json:"id"` //用户昵称 Name string `json:"name"` //用户头像 Avatar string `json:"avatar"` //用户权限列 Permissions []string `json:"permissions"` }
DataGetUserData 登录时的数据包汇总
func GetUserData ¶
func GetUserData(userID int64) (data DataGetUserData)
Click to show internal directories.
Click to hide internal directories.