wechat

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiniTool

type MiniTool struct {
	Mini *miniprogram.MiniProgram
}

func NewMini

func NewMini(conf WxMiniConf) *MiniTool

func (*MiniTool) Code2Session

func (m *MiniTool) Code2Session(code string) (auth.ResCode2Session, error)

Code2Session code 获取 openid,SessionKey

func (*MiniTool) Decrypt

func (m *MiniTool) Decrypt(sessionKey string, encryptedData string, iv string) (plainData *encryptor.PlainData, err error)

Decrypt 消息解密

func (*MiniTool) Send

func (m *MiniTool) Send(msg *subscribe.Message) error

Send 发送订阅消息

type WxMiniConf

type WxMiniConf struct {
	AppId  string `json:"AppId"`  //微信小程序appId(非公众号)
	Secret string `json:"Secret"` //微信小程序secret(非公众号)
}

WxMiniConf 微信小程序配置

Jump to

Keyboard shortcuts

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