Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WechatOpenPlatform ¶
type WechatOpenPlatform struct {
// contains filtered or unexported fields
}
func NewWechatOpenPlatform ¶
func NewWechatOpenPlatform(c Config) *WechatOpenPlatform
NewWechatOpenPlatform create a new wechat open platform instance.
func (*WechatOpenPlatform) GetAccessToken ¶
func (w *WechatOpenPlatform) GetAccessToken(code string) (*getAccessTokenResp, error)
GetAccessToken get access_token through code.
func (*WechatOpenPlatform) GetUserInfo ¶
func (w *WechatOpenPlatform) GetUserInfo(accessToken, openID string) (*getUserInfoResp, error)
GetUserInfo get user info through access_token and openid.
func (*WechatOpenPlatform) QRConnect ¶
func (w *WechatOpenPlatform) QRConnect(redirectURI string, state string) (string, error)
QRConnect generate a QR connect URL for the wechat open platform. After the user allows authorization, they will be redirected to the redirect_uri URL with code and state parameters.
Click to show internal directories.
Click to hide internal directories.