driver

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MpQQCode2SessionUrl = "https://api.q.qq.com/sns/jscode2session"
)
View Source
const (
	MpWechatCode2SessionUrl = "https://api.weixin.qq.com/sns/jscode2session"
)
View Source
const (
	QQGetUserInfoUrl = "https://graph.qq.com/user/get_user_info?access_token=%s&openid=%s&oauth_consumer_key=%s"
)

Variables

This section is empty.

Functions

func GetMpQQ

func GetMpQQ() *mpQQDriver

func GetMpWechat

func GetMpWechat() *mpWechatDriver

func GetQQ

func GetQQ() *qqDriver

Types

type Code2Session

type Code2Session struct {
	Url       string
	AppId     string
	Secret    string
	Code      string
	GrantType string
}

func (*Code2Session) CommonCode2Session

func (c2s *Code2Session) CommonCode2Session(ctx context.Context) (*Code2SessionRsp, error)

type Code2SessionRsp

type Code2SessionRsp struct {
	OpenId      string `json:"openid,omitempty"`
	SessionKey  string `json:"session_key,omitempty"`
	AccessToken string `json:"access_token,omitempty"`
	UnionId     string `json:"union_id,omitempty"`
	ErrCode     int64  `json:"errcode,omitempty"`
	ErrMsg      string `json:"errmsg,omitempty"`
}

Jump to

Keyboard shortcuts

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