Documentation
¶
Index ¶
- type APIResponse
- type AuthorizerAccessToken
- type ComponentAccessToken
- type DBStorage
- type FileStorage
- type MemoryStorage
- type OfficialAccountAPIClient
- type OfficialAccountButton
- type OfficialAccountClient
- type OfficialAccountConfig
- type OfficialAccountCustomClient
- type OfficialAccountMaterialClient
- type OfficialAccountMenu
- type OfficialAccountMenuClient
- type OfficialAccountMessageClient
- type OfficialAccountMessageImage
- type OfficialAccountMessageText
- type OfficialAccountMessageVideo
- type OfficialAccountMessageVoice
- type OfficialAccountMiniProgramPageMessage
- type OfficialAccountMusicMessage
- type OfficialAccountNewsArticle
- type OfficialAccountNewsMessage
- type OfficialAccountTemplateClient
- type OfficialAccountTemplateMessageData
- type OfficialAccountTemplateMessageRequest
- type OfficialAccountWXCardMessage
- type OpenPlatformAuthorizationInfo
- type OpenPlatformAuthorizerInfo
- type OpenPlatformConfig
- type PreAuthCode
- type TokenStorage
- type UserInfo
- type WeGo
- func (w *WeGo) Crypto() *crypto.CryptoClient
- func (w *WeGo) OfficialAccountAPI() *official_account.APIClient
- func (w *WeGo) OfficialAccountCustom() *official_account.CustomClient
- func (w *WeGo) OfficialAccountMaterial() *official_account.MaterialClient
- func (w *WeGo) OfficialAccountMenu() *official_account.MenuClient
- func (w *WeGo) OfficialAccountMessage() *official_account.MessageClient
- func (w *WeGo) OfficialAccountOAuth() *official_account.OAuthClient
- func (w *WeGo) OfficialAccountSubscribe() *official_account.SubscribeClient
- func (w *WeGo) OfficialAccountTemplate() *official_account.TemplateClient
- func (w *WeGo) OpenPlatformAuth() *openplatform.AuthClient
- func (w *WeGo) OpenPlatformMessage() *message.MessageClient
- func (w *WeGo) OpenPlatformOAuth(redirectURI string) *openplatform.OAuthClient
- func (w *WeGo) SetHTTPClient(client core.HTTPClient)
- func (w *WeGo) SetLogger(log debugger.LoggerInterface)
- func (w *WeGo) Storage() *storage.StorageClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OfficialAccountAPIClient ¶
type OfficialAccountAPIClient = official_account.APIClient
导出常用结构体类型
type OfficialAccountCustomClient ¶
type OfficialAccountCustomClient = official_account.CustomClient
导出常用结构体类型
type OfficialAccountMaterialClient ¶
type OfficialAccountMaterialClient = official_account.MaterialClient
导出常用结构体类型
type OfficialAccountMenuClient ¶
type OfficialAccountMenuClient = official_account.MenuClient
导出常用结构体类型
type OfficialAccountMessageClient ¶
type OfficialAccountMessageClient = official_account.MessageClient
导出常用结构体类型
type OfficialAccountMessageImage ¶
type OfficialAccountMessageImage = official_account.MessageImage
导出常用结构体类型
type OfficialAccountMessageText ¶
type OfficialAccountMessageText = official_account.MessageText
导出常用结构体类型
type OfficialAccountMessageVideo ¶
type OfficialAccountMessageVideo = official_account.MessageVideo
导出常用结构体类型
type OfficialAccountMessageVoice ¶
type OfficialAccountMessageVoice = official_account.MessageVoice
导出常用结构体类型
type OfficialAccountMiniProgramPageMessage ¶
type OfficialAccountMiniProgramPageMessage = official_account.MessageMiniProgramPage
导出常用结构体类型
type OfficialAccountMusicMessage ¶
type OfficialAccountMusicMessage = official_account.MessageMusic
导出常用结构体类型
type OfficialAccountNewsArticle ¶
type OfficialAccountNewsArticle = official_account.NewsArticle
导出常用结构体类型
type OfficialAccountNewsMessage ¶
type OfficialAccountNewsMessage = official_account.MessageNews
导出常用结构体类型
type OfficialAccountTemplateClient ¶
type OfficialAccountTemplateClient = official_account.TemplateClient
导出常用结构体类型
type OfficialAccountTemplateMessageData ¶
type OfficialAccountTemplateMessageData = official_account.TemplateMessageData
导出常用结构体类型
type OfficialAccountTemplateMessageRequest ¶
type OfficialAccountTemplateMessageRequest = official_account.TemplateMessageRequest
导出常用结构体类型
type OfficialAccountWXCardMessage ¶
type OfficialAccountWXCardMessage = official_account.MessageWXCard
导出常用结构体类型
type OpenPlatformAuthorizationInfo ¶
type OpenPlatformAuthorizationInfo = openplatform.AuthorizationInfo
导出常用结构体类型
type OpenPlatformAuthorizerInfo ¶
type OpenPlatformAuthorizerInfo = openplatform.AuthorizerInfo
导出常用结构体类型
type WeGo ¶
type WeGo struct {
// 开放平台客户端
OpenPlatformClient *openplatform.Client
// 公众号客户端
OfficialAccountClient *official_account.Client
}
WeGo 微信开发封装库主结构体
func New ¶
New 创建新的WeGo实例,支持多种客户端配置和可选参数 同类型的客户端只能初始化一个,比如第一个参数是微信公众号,后面的不管还有几个公众号配置都忽略掉 @param configParams ...any 配置参数,支持以下类型:
- openplatform.Config 或 *openplatform.Config: 开放平台配置
- official_account.Config 或 *official_account.Config: 公众号配置
@param optParams ...any 可选参数,支持以下类型:
- debugger.LoggerInterface: 自定义日志器
- core.HTTPClient: 自定义HTTP客户端
- openplatform.EventHandler: 开放平台事件处理器
@return *WeGo WeGo实例
func NewWithStorage ¶
func NewWithStorage(storage storage.TokenStorage, params ...any) *WeGo
NewWithStorage 创建新的WeGo实例(使用自定义存储),支持可选参数 同类型的客户端只能初始化一个,比如第一个参数是微信公众号,后面的不管还有几个公众号配置都忽略掉 @param storage storage.TokenStorage 自定义存储实例 @param configParams ...any 配置参数,支持以下类型:
- openplatform.Config 或 *openplatform.Config: 开放平台配置
- official_account.Config 或 *official_account.Config: 公众号配置
@param optParams ...any 可选参数,支持以下类型:
- debugger.LoggerInterface: 自定义日志器
- core.HTTPClient: 自定义HTTP客户端
- openplatform.EventHandler: 开放平台事件处理器
@return *WeGo WeGo实例
func (*WeGo) OfficialAccountAPI ¶
func (w *WeGo) OfficialAccountAPI() *official_account.APIClient
OfficialAccountAPI 返回公众号API相关功能
func (*WeGo) OfficialAccountCustom ¶
func (w *WeGo) OfficialAccountCustom() *official_account.CustomClient
OfficialAccountCustom 返回公众号客服消息相关功能
func (*WeGo) OfficialAccountMaterial ¶
func (w *WeGo) OfficialAccountMaterial() *official_account.MaterialClient
OfficialAccountMaterial 返回公众号素材管理相关功能
func (*WeGo) OfficialAccountMenu ¶
func (w *WeGo) OfficialAccountMenu() *official_account.MenuClient
OfficialAccountMenu 返回公众号菜单相关功能
func (*WeGo) OfficialAccountMessage ¶
func (w *WeGo) OfficialAccountMessage() *official_account.MessageClient
OfficialAccountMessage 返回公众号消息相关功能
func (*WeGo) OfficialAccountOAuth ¶
func (w *WeGo) OfficialAccountOAuth() *official_account.OAuthClient
OfficialAccountOAuth 返回公众号网页授权相关功能
func (*WeGo) OfficialAccountSubscribe ¶
func (w *WeGo) OfficialAccountSubscribe() *official_account.SubscribeClient
OfficialAccountSubscribe 返回公众号订阅消息相关功能 功能:获取订阅消息客户端实例,用于管理订阅消息相关功能 返回值:*official_account.SubscribeClient 订阅消息客户端指针
func (*WeGo) OfficialAccountTemplate ¶
func (w *WeGo) OfficialAccountTemplate() *official_account.TemplateClient
OfficialAccountTemplate 返回公众号模板消息相关功能
func (*WeGo) OpenPlatformAuth ¶
func (w *WeGo) OpenPlatformAuth() *openplatform.AuthClient
OpenPlatformAuth 返回开放平台授权相关功能
func (*WeGo) OpenPlatformMessage ¶
func (w *WeGo) OpenPlatformMessage() *message.MessageClient
OpenPlatformMessage 返回开放平台消息处理相关功能
func (*WeGo) OpenPlatformOAuth ¶
func (w *WeGo) OpenPlatformOAuth(redirectURI string) *openplatform.OAuthClient
OpenPlatformOAuth 返回开放平台网页授权相关功能(代公众号授权)
func (*WeGo) SetHTTPClient ¶
func (w *WeGo) SetHTTPClient(client core.HTTPClient)
SetHTTPClient 设置自定义HTTP客户端
Directories
¶
| Path | Synopsis |
|---|---|
|
Package official_account 微信公众号API - 参数二维码 本接口支持「服务号(仅认证)」账号类型调用。
|
Package official_account 微信公众号API - 参数二维码 本接口支持「服务号(仅认证)」账号类型调用。 |
|
Package openplatform 微信开放平台API - 调用授权方接口
|
Package openplatform 微信开放平台API - 调用授权方接口 |