logic

package
v0.0.0-...-5591726 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(ctx context.Context, req *passport.AuthReq) (*ret.IntResp, error)

func Ban

func Ban(ctx context.Context, req *passport.BanReq) (*ret.EmptyResp, error)

func GenToken

func GenToken(ctx context.Context,
	userId int64,
	device model.Device,
	ip string) (string, error)

func GetUserSeqId

func GetUserSeqId(ctx context.Context, userId int64) (int64, error)

func Logout

func Logout(ctx context.Context, req *passport.LogoutReq) (*ret.EmptyResp, error)

func Qqlogin

func Qqlogin(ctx context.Context, req *passport.QqloginReq) (*passport.LoginResp, error)

func Refresh

func Refresh(ctx context.Context, req *passport.RefreshReq) (*ret.StringResp, error)

func Sms

func Sms(ctx context.Context, req *passport.SmsReq) (*ret.EmptyResp, error)

发送短信 天极流控是由第三方去处理就可以了,我们不用管理

func TelLogin

func TelLogin(ctx context.Context, req *passport.TelLoginReq) (*passport.LoginResp, error)

func UnBan

func UnBan(ctx context.Context, req *passport.UnBanReq) (*ret.EmptyResp, error)

func WxLogin

func WxLogin(ctx context.Context, req *passport.WxLoginReq) (*passport.LoginResp, error)

Types

type QQUserInfo

type QQUserInfo struct {
	Ret             int    `json:"ret"`
	Msg             string `json:"msg"`
	Nickname        string `json:"nickname"`
	Figureurl       string `json:"figureurl"`
	Figureurl1      string `json:"figureurl_1"`
	Figureurl2      string `json:"figureurl_2"`
	FigureurlQq1    string `json:"figureurl_qq_1"`
	FigureurlQq2    string `json:"figureurl_qq_2"`
	Gender          string `json:"gender"`
	IsYellowVip     string `json:"is_yellow_vip"`
	Vip             string `json:"vip"`
	YellowVipLevel  string `json:"yellow_vip_level"`
	Level           string `json:"level"`
	IsYellowYearVip string `json:"is_yellow_year_vip"`
}

func GetQQSimpleUserInfo

func GetQQSimpleUserInfo(ctx context.Context, openid, token string) (*QQUserInfo, error)

type WxAccessToken

type WxAccessToken struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Openid       string `json:"openid"`
	Scope        string `json:"scope"`
	Unionid      string `json:"unionid"`
}

type WxUserInfo

type WxUserInfo struct {
	Openid     string   `json:"openid"`
	Nickname   string   `json:"nickname"`
	Sex        int      `json:"sex"`
	Province   string   `json:"province"`
	City       string   `json:"city"`
	Country    string   `json:"country"`
	Headimgurl string   `json:"headimgurl"`
	Privilege  []string `json:"privilege"`
	Unionid    string   `json:"unionid"`
}

Jump to

Keyboard shortcuts

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