Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
AccessToken string `json:"access_token"`
ExpiresIn int64 `json:"expires_in"`
}
AccessToken access token
type AccessTokenInterface ¶
type AccessTokenInterface interface {
// AccessToken 获取公众账号access_token
AccessToken() (AccessToken, error)
// AccessTokenCacheKey 获取公众账号access_token缓存key
AccessTokenCacheKey() string
}
AccessTokenInterface 公众账号获取token接口
type AccountInterface ¶
type AccountInterface interface {
AccessTokenInterface
// IsOpenPlatform 是否为开放平台下授权的公众账号
IsOpenPlatform() bool
// Token 获取公众账号token
Token() string
// AesKey 获取公众账号aes_key
AesKey() string
// AppId 获取公众账号appID
AppId() string
// AppSecret 获取公众账号app_secret
AppSecret() string
// ComponentAppId 获取开放平台appID
ComponentAppId() string
// ComponentAccessToken 获取开放平台access_token
ComponentAccessToken() string
// Cache 获取缓存实例
Cache() (cache.Cache, string)
// PlatformType 平台类型
PlatformType() string
}
AccountInterface 公众账号接口
type AuthorizerAccessTokenInterface ¶
type AuthorizerAccessTokenInterface interface {
// AuthorizerAccessToken 代公众账号获取access_token
AuthorizerAccessToken(appId, authorizerRefreshToken string, refresh bool, locker lock.Locker) (AccessToken, error)
// AuthorizerAccessTokenCacheKey 公众账号access_token缓存key
AuthorizerAccessTokenCacheKey(appId string) string
}
AuthorizerAccessTokenInterface 开放平台代公众账号获取token接口
type AuthorizerInterface ¶
type AuthorizerInterface interface {
AuthorizerAccessTokenInterface
// AuthorizerAccountToken 获取已授权公众账号token
AuthorizerAccountToken() string
// AuthorizerAccountAesKey 获取已授权公众账号aes_key
AuthorizerAccountAesKey() string
// ComponentAppId 获取开放平台账号appID
ComponentAppId() string
// ComponentAccessToken 获取开放平台账号access_token
ComponentAccessToken() string
}
AuthorizerInterface 开放平台-第三方平台接口(代公众账号发起接口调用方)
type EventHandlerInterface ¶
type EventHandlerInterface interface {
Handle(account AccountInterface, messageBody *message.Message) *reply.Reply
}
EventHandlerInterface 事件处理器接口
Click to show internal directories.
Click to hide internal directories.