Help us shape the future of Go! Take the 2026 Go Developer Survey

wx

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	api.Result
	SessionKey string `json:"session_key"`
	OpenId     string `json:"openid"`
	UnionId    string `json:"unionid"`
}

Session wechat miniprogram login session

type WxAPI

type WxAPI interface {
	Code2Session(code string) (*Session, error)                                               // 小程序登录凭证校验, 通过code换取openid和unionid
	CreateLimitedWxaCode(accessToken, path string, width int) ([]byte, error)                 // 创建有限小程序码
	CreateUnlimitedWxaCode(accessToken string, scene, page string, width int) ([]byte, error) // 创建无限小程序码
	GetUserPhoneNumber(accessToken, code string) (string, error)                              // 获取电话号码
}

func New

func New(appId, appSecret string) WxAPI

Jump to

Keyboard shortcuts

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