Documentation ¶
Overview ¶
微信错误返回
regular tasks api these api will be run on time
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UrlEncoded ¶
Types ¶
type NormalApi ¶
type NormalApi interface { GetPublicInfo(accessToken, authCode string) (*PublicInfo, error) GetAuthAccessToken(accessToken, appId, refreshToken string) (*PublicToken, error) GetAuthProfile(accessToken, appId string) (*PublicProfile, error) GetAuthOption(accessToken, appId, option string) (*PublicOption, error) SetAuthOption(accessToken, appId, optionName, optionValue string) error }
type PublicInfo ¶
type PublicInfo struct { AuthorizationInfo struct { AppId string `json:"authorizer_appid"` AccessToken string `json:"authorizer_access_token"` ExpiresIn float64 `json:"expires_in"` RefreshToken string `json:"authorizer_refresh_token"` FuncInfo []struct { Funcscope struct { Id int64 `json:"id"` } `json:"funcscope_category"` } `json:"func_info"` } `json:"authorization_info"` }
type PublicOption ¶
type PublicProfile ¶
type PublicProfile struct { AuthorizerInfo struct { NickName string `json:"nick_name"` HeadImg string `json:"head_img"` ServiceTypeInfo struct { Id int64 `json:"id"` } VerifyTypeInfo struct { Id int64 `json:"id"` } UserName string `json:"user_name"` Alias string `json:"alias"` } `json:"authorizer_info"` QR string `json:"qrcode_url"` AuthorizationInfo struct { AppId string `json:"appid"` FuncInfo []struct { Funcscope struct { Id int64 `json:"id"` } `json:"funcscope_category"` } `json:"func_info"` } `json:"authorization_info"` }
type PublicToken ¶
type PublicToken struct { AccessToken string `json:"authorizer_access_token"` ExpiresIn float64 `json:"expires_in"` RefreshToken string `json:"authorizer_refresh_token"` }
authorizer access token and refresh token
type RegularApi ¶
type WechatComponent ¶
type WechatComponent interface { GetRegularApi() RegularApi GetNormalApi() NormalApi OAuthUrl(redirectUrl, preAuthCode string) string GetCipher() (lib.IOCipher, error) }
微信第三方平台interface
func New ¶
func New(appId, appSecret, cryptoKey, token string) WechatComponent
type WechatThird ¶
type WechatThird struct {
// contains filtered or unexported fields
}
微信第三方公众号平台 实现 ServeHTTP interface
func (*WechatThird) GetNormalApi ¶
func (wt *WechatThird) GetNormalApi() NormalApi
func (*WechatThird) GetRegularApi ¶
func (wt *WechatThird) GetRegularApi() RegularApi
func (*WechatThird) OAuthUrl ¶
func (wt *WechatThird) OAuthUrl(redirectUrl, preAuthCode string) string
Click to show internal directories.
Click to hide internal directories.