wechat

package module
v0.0.0-...-a84b744 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 9 Imported by: 0

README

Wechat

微信 Golang 版本SDK

部分公共库来自 https://github.com/go-pay/wechat-sdk

因为使用了分布部署,access_token要自己维护所以重写,并且只加了自己项目要用到的接口,后续会补充接口

微信小程序接口地址

https://developers.weixin.qq.com/miniprogram/dev/api-backend/

安装

go get -u github.com/medreams/wechat

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WeChatSDK

type WeChatSDK struct {
	AppId     string
	AppSecret string
	// contains filtered or unexported fields
}

func NewWeChatSDK

func NewWeChatSDK(ctx context.Context, appId, appSecret string, isAccessToken ...bool) *WeChatSDK

func (*WeChatSDK) CleanAccessToken

func (sdk *WeChatSDK) CleanAccessToken()

func (*WeChatSDK) GetAccessToken

func (sdk *WeChatSDK) GetAccessToken() (access_token string)

func (*WeChatSDK) NewMini

func (sdk *WeChatSDK) NewMini() *mini.SDK

小程序

func (*WeChatSDK) NewOfficial

func (sdk *WeChatSDK) NewOfficial() *official.SDK

公众号

func (*WeChatSDK) NewOpen

func (sdk *WeChatSDK) NewOpen() *open.SDK

开放平台

func (*WeChatSDK) NewWe

func (sdk *WeChatSDK) NewWe() *we.SDK

公共

func (*WeChatSDK) SetAccessToken

func (sdk *WeChatSDK) SetAccessToken(token common.WxAccessToken) (err error)

Directories

Path Synopsis
pkg
aes

Jump to

Keyboard shortcuts

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