1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

将小程序获取ak的方式也抽象出来

This commit is contained in:
silenceper
2020-05-25 22:00:51 +08:00
parent b599e93c5b
commit 972dec0406
5 changed files with 15 additions and 104 deletions

View File

@@ -1,18 +1,12 @@
package context
import (
"sync"
"github.com/silenceper/wechat/v2/credential"
"github.com/silenceper/wechat/v2/miniprogram/config"
)
// Context struct
type Context struct {
*config.Config
//accessTokenLock 读写锁 同一个AppID一个
accessTokenLock *sync.RWMutex
//accessTokenFunc 自定义获取 access token 的方法
accessTokenFunc GetAccessTokenFunc
credential.AccessTokenHandle
}