wechat

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppID     string
	AppSecret string
}

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.

Jump to

Keyboard shortcuts

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