Documentation ¶
Index ¶
- func Init(us UserSystem, wx WeixinSupport, wb WeiboSupport, qqsp QqSupport, ...)
- func MobilePreRegister(mobile string) (string, error)
- func MobilePreSet(mobile string, id appgo.Id) (string, error)
- func MobilePwReset(mobile string) (string, error)
- func MobileVerifyPwReset(mobile, code, password string) error
- func MobileVerifyRegister(mobile, code string) (string, error)
- func MobileVerifySet(mobile string, id appgo.Id, code string) error
- type LoginResult
- func LoginByMobile(mobile, password string, role appgo.Role) (*LoginResult, error)
- func LoginByOAuth(code string, index int, role appgo.Role) (*LoginResult, error)
- func LoginByQq(openId, token string, role appgo.Role) (*LoginResult, error)
- func LoginByWeibo(openId, token, code string, role appgo.Role) (*LoginResult, error)
- func LoginByWeixin(openId, token, code string, role appgo.Role) (*LoginResult, error)
- func MobileRegisterUser(info *MobileUserInfo, role appgo.Role) (*LoginResult, error)
- type MobileSupport
- type MobileUserInfo
- type OAuthSupport
- type QqSupport
- type Token
- type UserSystem
- type WeiboSupport
- type WeixinSupport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(us UserSystem, wx WeixinSupport, wb WeiboSupport, qqsp QqSupport, mobile MobileSupport, oauth OAuthSupport)
func MobilePreRegister ¶
func MobilePwReset ¶
func MobileVerifyPwReset ¶
func MobileVerifyRegister ¶
Types ¶
type LoginResult ¶
type LoginResult struct { UserId appgo.Id Token Token UserInfo interface{} Banned bool BanInfo interface{} }
func LoginByMobile ¶
func LoginByMobile(mobile, password string, role appgo.Role) (*LoginResult, error)
func LoginByOAuth ¶
func LoginByWeibo ¶
func LoginByWeibo(openId, token, code string, role appgo.Role) (*LoginResult, error)
func LoginByWeixin ¶
func LoginByWeixin(openId, token, code string, role appgo.Role) (*LoginResult, error)
func MobileRegisterUser ¶
func MobileRegisterUser(info *MobileUserInfo, role appgo.Role) (*LoginResult, error)
type MobileSupport ¶
type MobileSupport interface { HasMobileUser(mobile string) (bool, error) GetMobileUser(mobile, password string) (uid appgo.Id, err error) AddMobileUser(info *MobileUserInfo) (uid appgo.Id, err error) UpdatePwByMobile(mobile, password string) error SetMobileForUser(mobile string, userId appgo.Id) error appgo.MobileMsgSender appgo.KvStore }
type MobileUserInfo ¶
type OAuthSupport ¶
type UserSystem ¶
type WeiboSupport ¶
Click to show internal directories.
Click to hide internal directories.