Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdGetAccessToken ¶
func CmdGetAccessToken(arg *CmdTokenParams) error
CmdGetAccessToken 获取微信接口调用凭证
Types ¶
type AccessTokenMeta ¶
type AccessTokenMeta struct { AccessToken string `json:"access_token"` // 微信接口调用凭证 ExpireIn int64 `json:"expires_in"` // 微信接口调用凭证有效时间,单位:秒 ExpireAt time.Time `json:"expire_at,omitempty"` // 微信接口调用凭证到期时间 }
func FetchAccessToken ¶
func FetchAccessToken(appID, appSecret string) (*AccessTokenMeta, error)
FetchAccessToken 获取微信接口调用凭证 正常情况下,微信会返回下述 JSON {"access_token":"ACCESS_TOKEN","expires_in":7200} 错误时微信会返回错误码等信息,JSON数据包示例如下: {"errcode":40013,"errmsg":"invalid appid"}
func (AccessTokenMeta) String ¶
func (t AccessTokenMeta) String() string
type AccessTokenResponse ¶
type AccessTokenResponse struct { weixin.ResponseMeta AccessTokenMeta }
AccessTokenResponse 响应
type CmdTokenParams ¶
Click to show internal directories.
Click to hide internal directories.