UserLogin2

package
v5.1.29 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpenSub = false
)

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

func GetUserPermissions(userID int64) []string

GetUserPermissions 获取用户登录常用的权限组

func GetUserPermissionsByUserInfo

func GetUserPermissionsByUserInfo(userInfo *UserCore.FieldsUserType) []string

func Init added in v5.1.24

func Init()

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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