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

实现access_token获取

This commit is contained in:
wenzl
2016-09-11 13:16:15 +08:00
parent 33f2b2ef60
commit d9075933c1
7 changed files with 195 additions and 4 deletions

View File

@@ -1,6 +1,11 @@
package context
import "net/http"
import (
"net/http"
"sync"
"github.com/silenceper/wechat/cache"
)
//Context struct
type Context struct {
@@ -9,12 +14,13 @@ type Context struct {
Token string
EncodingAESKey string
Cache cache.Cache
Writer http.ResponseWriter
Request *http.Request
}
func (ctx *Context) getAccessToken() {
//accessTokenLock 读写锁 同一个AppID一个
accessTokenLock *sync.RWMutex
}
// Query returns the keyed url query value if it exists