Documentation ¶
Overview ¶
微信公众号核心库
Index ¶
- Constants
- type AccessTokenInfo
- type Context
- func (ctx *Context) GetAccessToken() (accessToken string, err error)
- func (ctx *Context) GetAccessTokenFromServer() (accessToken string, err error)
- func (ctx *Context) GetAccessTokenLock() *sync.RWMutex
- func (ctx *Context) GetJsAPITicketLock() *sync.RWMutex
- func (ctx *Context) GetQuery(key string) (string, bool)
- func (ctx *Context) Query(key string) string
- func (ctx *Context) Render(bytes []byte)
- func (ctx *Context) ResponseXML(obj interface{}) string
- func (ctx *Context) SetAccessTokenLock(lock *sync.RWMutex)
- func (ctx *Context) SetJsAPITicketLock(lock *sync.RWMutex)
- func (ctx *Context) SetThirdAccessToken(thirdAccessToken string, expires int) (wxError util.WxError, err error)
- func (ctx *Context) String(str string)
- func (ctx *Context) XML(obj interface{})
Constants ¶
View Source
const ( AccessTokenURL = "https://api.weixin.qq.com/cgi-bin/token" AccessTokenCachePrefix = "wechat_mp_access_token_appid_" AccessTokenThirdCachePrefix = "wechat_mp_access_token_third_appid_" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenInfo ¶
type Context ¶
type Context struct { AppID string AppSecret string Token string EncodingAESKey string PayMchId string PayNotifyUrl string PayKey string ThirdAccessToken bool CacheModel string //缓存模式 Cache cache.Cache //缓存 WXLog flog.LoggerInterface ProxyUrl string //代理地址 Writer http.ResponseWriter Request *http.Request // contains filtered or unexported fields }
func (*Context) GetAccessToken ¶
func (*Context) GetAccessTokenFromServer ¶
从微信服务器获取token
func (*Context) GetAccessTokenLock ¶
func (*Context) ResponseXML ¶
func (*Context) SetAccessTokenLock ¶
func (*Context) SetJsAPITicketLock ¶
设置lock
Click to show internal directories.
Click to hide internal directories.