Documentation
¶
Index ¶
- type APIResponse
- type AuthorizerAccessToken
- type ComponentAccessToken
- type DBStorage
- type FileStorage
- type MiniProgramClient
- type MiniProgramCode2SessionResponse
- type MiniProgramConfig
- type MiniProgramGetPhoneNumberResponse
- type MiniProgramPhoneInfo
- type MiniProgramUserInfo
- 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 PaymentAPIError
- type PaymentAPIErrorDetail
- type PaymentAmount
- type PaymentAppPayParams
- type PaymentAppRequest
- type PaymentBillRequest
- type PaymentBillResponse
- type PaymentClient
- type PaymentCloseOrderRequest
- type PaymentConfig
- type PaymentH5Info
- type PaymentH5Request
- type PaymentH5Response
- type PaymentJSAPIPayParams
- type PaymentJSAPIRequest
- type PaymentNativeRequest
- type PaymentNativeResponse
- type PaymentNotification
- type PaymentNotificationHeaders
- type PaymentOrder
- type PaymentPayer
- type PaymentPrepayResponse
- type PaymentProfitSharingAmountsResponse
- type PaymentProfitSharingReceiver
- type PaymentProfitSharingReceiverResult
- type PaymentProfitSharingRequest
- type PaymentProfitSharingResponse
- type PaymentProfitSharingReturnRequest
- type PaymentProfitSharingReturnResponse
- type PaymentProfitSharingUnfreezeRequest
- type PaymentRefundAmount
- type PaymentRefundRequest
- type PaymentRefundResponse
- type PaymentResource
- type PaymentSceneInfo
- type PreAuthCode
- type SqliteStorage
- type TokenStorage
- type UserInfo
- type WeGo
- func (w *WeGo) Crypto() *crypto.CryptoClient
- func (w *WeGo) MiniProgram() *miniprogram.Clientdeprecated
- func (w *WeGo) MiniProgramE() (*miniprogram.Client, error)
- func (w *WeGo) OfficialAccount() *official_account.Client
- func (w *WeGo) OfficialAccountAPI() *official_account.APIClient
- func (w *WeGo) OfficialAccountAPIE() (*official_account.APIClient, error)
- func (w *WeGo) OfficialAccountCustom() *official_account.CustomClient
- func (w *WeGo) OfficialAccountCustomE() (*official_account.CustomClient, error)
- func (w *WeGo) OfficialAccountE() (*official_account.Client, error)
- func (w *WeGo) OfficialAccountMaterial() *official_account.MaterialClient
- func (w *WeGo) OfficialAccountMaterialE() (*official_account.MaterialClient, error)
- func (w *WeGo) OfficialAccountMenu() *official_account.MenuClient
- func (w *WeGo) OfficialAccountMenuE() (*official_account.MenuClient, error)
- func (w *WeGo) OfficialAccountMessage() *official_account.MessageClient
- func (w *WeGo) OfficialAccountMessageE() (*official_account.MessageClient, error)
- func (w *WeGo) OfficialAccountOAuth() *official_account.OAuthClient
- func (w *WeGo) OfficialAccountOAuthE() (*official_account.OAuthClient, error)
- func (w *WeGo) OfficialAccountSubscribe() *official_account.SubscribeClient
- func (w *WeGo) OfficialAccountSubscribeE() (*official_account.SubscribeClient, error)deprecated
- func (w *WeGo) OfficialAccountSubscribeNotify() *official_account.SubscribeNotifyClient
- func (w *WeGo) OfficialAccountSubscribeNotifyE() (*official_account.SubscribeNotifyClient, error)
- func (w *WeGo) OfficialAccountTemplate() *official_account.TemplateClient
- func (w *WeGo) OfficialAccountTemplateE() (*official_account.TemplateClient, error)
- func (w *WeGo) OfficialAccountUser() *official_account.UserClient
- func (w *WeGo) OfficialAccountUserE() (*official_account.UserClient, error)
- func (w *WeGo) OpenPlatform() *openplatform.Client
- func (w *WeGo) OpenPlatformAuth() *openplatform.AuthClient
- func (w *WeGo) OpenPlatformAuthE() (*openplatform.AuthClient, error)
- func (w *WeGo) OpenPlatformE() (*openplatform.Client, error)
- func (w *WeGo) OpenPlatformMessage() *message.MessageClient
- func (w *WeGo) OpenPlatformMessageE() (*message.MessageClient, error)
- func (w *WeGo) OpenPlatformOAuth(redirectURI, authorizerAppID string) *openplatform.OAuthClientdeprecated
- func (w *WeGo) OpenPlatformOAuthE(redirectURI, authorizerAppID string) (*openplatform.OAuthClient, error)
- func (w *WeGo) Payment() *payment.Clientdeprecated
- func (w *WeGo) PaymentE() (*payment.Client, error)
- 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 MiniProgramCode2SessionResponse ¶ added in v0.1.0
type MiniProgramCode2SessionResponse = miniprogram.Code2SessionResponse
导出常用结构体类型
type MiniProgramGetPhoneNumberResponse ¶ added in v0.1.0
type MiniProgramGetPhoneNumberResponse = miniprogram.GetPhoneNumberResponse
导出常用结构体类型
type MiniProgramPhoneInfo ¶ added in v0.1.0
type MiniProgramPhoneInfo = miniprogram.PhoneInfo
导出常用结构体类型
type MiniProgramUserInfo ¶ added in v0.1.0
type MiniProgramUserInfo = miniprogram.UserInfo
导出常用结构体类型
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 PaymentAPIErrorDetail ¶ added in v0.1.0
type PaymentAPIErrorDetail = payment.APIErrorDetail
导出常用结构体类型
type PaymentAppPayParams ¶ added in v0.1.0
type PaymentAppPayParams = payment.AppPayParams
导出常用结构体类型
type PaymentBillResponse ¶ added in v0.1.0
type PaymentBillResponse = payment.BillResponse
导出常用结构体类型
type PaymentCloseOrderRequest ¶ added in v0.1.0
type PaymentCloseOrderRequest = payment.CloseOrderRequest
导出常用结构体类型
type PaymentJSAPIPayParams ¶ added in v0.1.0
type PaymentJSAPIPayParams = payment.JSAPIPayParams
导出常用结构体类型
type PaymentJSAPIRequest ¶ added in v0.1.0
type PaymentJSAPIRequest = payment.JSAPIRequest
导出常用结构体类型
type PaymentNativeRequest ¶ added in v0.1.0
type PaymentNativeRequest = payment.NativeRequest
导出常用结构体类型
type PaymentNativeResponse ¶ added in v0.1.0
type PaymentNativeResponse = payment.NativeResponse
导出常用结构体类型
type PaymentNotification ¶ added in v0.1.0
type PaymentNotification = payment.Notification
导出常用结构体类型
type PaymentNotificationHeaders ¶ added in v0.1.0
type PaymentNotificationHeaders = payment.NotificationHeaders
导出常用结构体类型
type PaymentPrepayResponse ¶ added in v0.1.0
type PaymentPrepayResponse = payment.PrepayResponse
导出常用结构体类型
type PaymentProfitSharingAmountsResponse ¶ added in v0.1.0
type PaymentProfitSharingAmountsResponse = payment.ProfitSharingAmountsResponse
导出常用结构体类型
type PaymentProfitSharingReceiver ¶ added in v0.1.0
type PaymentProfitSharingReceiver = payment.ProfitSharingReceiver
导出常用结构体类型
type PaymentProfitSharingReceiverResult ¶ added in v0.1.0
type PaymentProfitSharingReceiverResult = payment.ProfitSharingReceiverResult
导出常用结构体类型
type PaymentProfitSharingRequest ¶ added in v0.1.0
type PaymentProfitSharingRequest = payment.ProfitSharingRequest
导出常用结构体类型
type PaymentProfitSharingResponse ¶ added in v0.1.0
type PaymentProfitSharingResponse = payment.ProfitSharingResponse
导出常用结构体类型
type PaymentProfitSharingReturnRequest ¶ added in v0.1.0
type PaymentProfitSharingReturnRequest = payment.ProfitSharingReturnRequest
导出常用结构体类型
type PaymentProfitSharingReturnResponse ¶ added in v0.1.0
type PaymentProfitSharingReturnResponse = payment.ProfitSharingReturnResponse
导出常用结构体类型
type PaymentProfitSharingUnfreezeRequest ¶ added in v0.1.0
type PaymentProfitSharingUnfreezeRequest = payment.ProfitSharingUnfreezeRequest
导出常用结构体类型
type PaymentRefundAmount ¶ added in v0.1.0
type PaymentRefundAmount = payment.RefundAmount
导出常用结构体类型
type PaymentRefundRequest ¶ added in v0.1.0
type PaymentRefundRequest = payment.RefundRequest
导出常用结构体类型
type PaymentRefundResponse ¶ added in v0.1.0
type PaymentRefundResponse = payment.RefundResponse
导出常用结构体类型
type WeGo ¶
type WeGo struct {
// 开放平台客户端
OpenPlatformClient *openplatform.Client
// 公众号客户端
OfficialAccountClient *official_account.Client
// 微信小程序客户端
MiniProgramClient *miniprogram.Client
// 微信支付客户端
PaymentClient *payment.Client
}
WeGo 微信开发封装库主结构体
func New
deprecated
New 创建新的WeGo实例,支持多种客户端配置和可选参数 同类型的客户端只能初始化一个,比如第一个参数是微信公众号,后面的不管还有几个公众号配置都忽略掉
Deprecated: 任一客户端初始化失败时会直接 log.Panic 终止进程,依赖库不应越权决定宿主进程生死。 请改用 NewE。
@param configParams ...any 配置参数,支持以下类型:
- openplatform.Config 或 *openplatform.Config: 开放平台配置
- official_account.Config 或 *official_account.Config: 公众号配置
- miniprogram.Config 或 *miniprogram.Config: 微信小程序配置
- payment.Config 或 *payment.Config: 微信支付配置
@param optParams ...any 可选参数,支持以下类型:
- debugger.LoggerInterface: 自定义日志器
- core.HTTPClient: 自定义HTTP客户端
- openplatform.EventHandler: 开放平台事件处理器
@return *WeGo WeGo实例
func NewE ¶ added in v0.1.3
NewE 创建新的WeGo实例(出错返回 error),支持多种客户端配置和可选参数 同类型的客户端只能初始化一个,比如第一个参数是微信公众号,后面的不管还有几个公众号配置都忽略掉
@param params ...any 配置参数与可选参数,说明同 New
@return *WeGo WeGo实例 @return error 任一客户端初始化失败时返回错误
func NewWithStorage
deprecated
func NewWithStorage(tokenStorage storage.TokenStorage, params ...any) *WeGo
NewWithStorage 创建新的WeGo实例(使用自定义存储),支持可选参数
Deprecated: 任一客户端初始化失败时会直接 log.Panic 终止进程,请改用 NewWithStorageE。
func NewWithStorageE ¶ added in v0.1.3
func NewWithStorageE(tokenStorage storage.TokenStorage, params ...any) (*WeGo, error)
NewWithStorageE 创建新的WeGo实例(使用自定义存储,出错返回 error)
@param tokenStorage storage.TokenStorage 自定义存储实例,不能为空 @param params ...any 配置参数与可选参数,说明同 New
@return *WeGo WeGo实例 @return error 任一客户端初始化失败时返回错误
func (*WeGo) MiniProgram
deprecated
added in
v0.1.0
func (w *WeGo) MiniProgram() *miniprogram.Client
MiniProgram 返回微信小程序客户端
返回:
- *miniprogram.Client: 小程序客户端
Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 MiniProgramE。
func (*WeGo) MiniProgramE ¶ added in v0.1.3
func (w *WeGo) MiniProgramE() (*miniprogram.Client, error)
MiniProgramE 返回微信小程序客户端(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccount ¶ added in v0.2.0
func (w *WeGo) OfficialAccount() *official_account.Client
OfficialAccount 返回公众号基础客户端 注意:JSSDK ticket(GetJSAPITicket/InvalidateJSAPITicket)挂在该客户端上。 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountE。
func (*WeGo) OfficialAccountAPI ¶
func (w *WeGo) OfficialAccountAPI() *official_account.APIClient
OfficialAccountAPI 返回公众号API相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountAPIE。
func (*WeGo) OfficialAccountAPIE ¶ added in v0.1.3
func (w *WeGo) OfficialAccountAPIE() (*official_account.APIClient, error)
OfficialAccountAPIE 返回公众号API相关功能(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccountCustom ¶
func (w *WeGo) OfficialAccountCustom() *official_account.CustomClient
OfficialAccountCustom 返回公众号客服消息相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountCustomE。
func (*WeGo) OfficialAccountCustomE ¶ added in v0.1.3
func (w *WeGo) OfficialAccountCustomE() (*official_account.CustomClient, error)
OfficialAccountCustomE 返回公众号客服消息相关功能(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccountE ¶ added in v0.2.0
func (w *WeGo) OfficialAccountE() (*official_account.Client, error)
OfficialAccountE 返回公众号基础客户端(E 版:未初始化时返回 error)
返回:
- *official_account.Client: 公众号基础客户端
- error: 未初始化公众号客户端时返回错误
func (*WeGo) OfficialAccountMaterial ¶
func (w *WeGo) OfficialAccountMaterial() *official_account.MaterialClient
OfficialAccountMaterial 返回公众号素材管理相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountMaterialE。
func (*WeGo) OfficialAccountMaterialE ¶ added in v0.1.3
func (w *WeGo) OfficialAccountMaterialE() (*official_account.MaterialClient, error)
OfficialAccountMaterialE 返回公众号素材管理相关功能(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccountMenu ¶
func (w *WeGo) OfficialAccountMenu() *official_account.MenuClient
OfficialAccountMenu 返回公众号菜单相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountMenuE。
func (*WeGo) OfficialAccountMenuE ¶ added in v0.1.3
func (w *WeGo) OfficialAccountMenuE() (*official_account.MenuClient, error)
OfficialAccountMenuE 返回公众号菜单相关功能(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccountMessage ¶
func (w *WeGo) OfficialAccountMessage() *official_account.MessageClient
OfficialAccountMessage 返回公众号消息相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountMessageE。
func (*WeGo) OfficialAccountMessageE ¶ added in v0.1.3
func (w *WeGo) OfficialAccountMessageE() (*official_account.MessageClient, error)
OfficialAccountMessageE 返回公众号消息相关功能(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccountOAuth ¶
func (w *WeGo) OfficialAccountOAuth() *official_account.OAuthClient
OfficialAccountOAuth 返回公众号网页授权相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountOAuthE。
func (*WeGo) OfficialAccountOAuthE ¶ added in v0.1.3
func (w *WeGo) OfficialAccountOAuthE() (*official_account.OAuthClient, error)
OfficialAccountOAuthE 返回公众号网页授权相关功能(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccountSubscribe ¶
func (w *WeGo) OfficialAccountSubscribe() *official_account.SubscribeClient
OfficialAccountSubscribe 返回公众号订阅通知相关功能(兼容层) 功能:获取订阅通知客户端实例(方法转发到 SubscribeNotifyClient) 返回值:*official_account.SubscribeClient 兼容层客户端指针 Deprecated: 客户端未初始化时会直接 panic 终止进程,且本入口指向兼容层, 请改用 OfficialAccountSubscribeNotifyE(返回 *official_account.SubscribeNotifyClient)。
func (*WeGo) OfficialAccountSubscribeE
deprecated
added in
v0.1.3
func (w *WeGo) OfficialAccountSubscribeE() (*official_account.SubscribeClient, error)
OfficialAccountSubscribeE 返回公众号订阅通知相关功能(兼容层,E 版:未初始化时返回 error)
Deprecated: 本入口指向兼容层,请改用 OfficialAccountSubscribeNotifyE (返回 *official_account.SubscribeNotifyClient,语义化方法名)。
func (*WeGo) OfficialAccountSubscribeNotify ¶ added in v0.2.0
func (w *WeGo) OfficialAccountSubscribeNotify() *official_account.SubscribeNotifyClient
OfficialAccountSubscribeNotify 返回公众号订阅通知相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountSubscribeNotifyE。
func (*WeGo) OfficialAccountSubscribeNotifyE ¶ added in v0.2.0
func (w *WeGo) OfficialAccountSubscribeNotifyE() (*official_account.SubscribeNotifyClient, error)
OfficialAccountSubscribeNotifyE 返回公众号订阅通知相关功能(E 版:未初始化时返回 error) 功能:公众号「订阅通知」全套接口(类目/模板管理 + bizsend 发送); 小程序订阅消息请使用 MiniProgramE 客户端的 SendSubscribeMessage。
返回:
- *official_account.SubscribeNotifyClient 订阅通知客户端
- error 未初始化公众号客户端时返回错误
func (*WeGo) OfficialAccountTemplate ¶
func (w *WeGo) OfficialAccountTemplate() *official_account.TemplateClient
OfficialAccountTemplate 返回公众号模板消息相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountTemplateE。
func (*WeGo) OfficialAccountTemplateE ¶ added in v0.1.3
func (w *WeGo) OfficialAccountTemplateE() (*official_account.TemplateClient, error)
OfficialAccountTemplateE 返回公众号模板消息相关功能(E 版:未初始化时返回 error)
func (*WeGo) OfficialAccountUser ¶ added in v0.2.0
func (w *WeGo) OfficialAccountUser() *official_account.UserClient
OfficialAccountUser 返回公众号用户管理相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OfficialAccountUserE。
func (*WeGo) OfficialAccountUserE ¶ added in v0.2.0
func (w *WeGo) OfficialAccountUserE() (*official_account.UserClient, error)
OfficialAccountUserE 返回公众号用户管理相关功能(E 版:未初始化时返回 error)
返回:
- *official_account.UserClient: 用户管理客户端(用户信息、标签管理)
- error: 未初始化公众号客户端时返回错误
func (*WeGo) OpenPlatform ¶ added in v0.2.0
func (w *WeGo) OpenPlatform() *openplatform.Client
OpenPlatform 返回开放平台客户端(含代小程序代码管理、域名设置、push ticket 等能力) Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OpenPlatformE。
func (*WeGo) OpenPlatformAuth ¶
func (w *WeGo) OpenPlatformAuth() *openplatform.AuthClient
OpenPlatformAuth 返回开放平台授权相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OpenPlatformAuthE。
func (*WeGo) OpenPlatformAuthE ¶ added in v0.1.3
func (w *WeGo) OpenPlatformAuthE() (*openplatform.AuthClient, error)
OpenPlatformAuthE 返回开放平台授权相关功能(E 版:未初始化时返回 error)
func (*WeGo) OpenPlatformE ¶ added in v0.2.0
func (w *WeGo) OpenPlatformE() (*openplatform.Client, error)
OpenPlatformE 返回开放平台客户端(E 版:未初始化时返回 error)
func (*WeGo) OpenPlatformMessage ¶
func (w *WeGo) OpenPlatformMessage() *message.MessageClient
OpenPlatformMessage 返回开放平台消息处理相关功能 Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OpenPlatformMessageE。
func (*WeGo) OpenPlatformMessageE ¶ added in v0.1.3
func (w *WeGo) OpenPlatformMessageE() (*message.MessageClient, error)
OpenPlatformMessageE 返回开放平台消息处理相关功能(E 版:未初始化时返回 error)
func (*WeGo) OpenPlatformOAuth
deprecated
func (w *WeGo) OpenPlatformOAuth(redirectURI, authorizerAppID string) *openplatform.OAuthClient
OpenPlatformOAuth 返回开放平台网页授权相关功能(代公众号授权)
参数:
- redirectURI: 授权后重定向地址
- authorizerAppID: 授权方公众号/小程序的 AppID,不能为空
Deprecated: 客户端未初始化时会直接 panic 终止进程,请改用 OpenPlatformOAuthE。
func (*WeGo) OpenPlatformOAuthE ¶ added in v0.1.3
func (w *WeGo) OpenPlatformOAuthE(redirectURI, authorizerAppID string) (*openplatform.OAuthClient, error)
OpenPlatformOAuthE 返回开放平台网页授权相关功能(E 版:未初始化时返回 error)
参数:
- redirectURI: 授权后重定向地址
- authorizerAppID: 授权方公众号/小程序的 AppID,不能为空
返回:
- *openplatform.OAuthClient: 网页授权客户端
- error: 客户端未初始化或 authorizerAppID 为空时返回错误
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 - 调用授权方接口 |
|
Package payment 微信支付 V3 - 商家转账(用户确认收款模式,单笔) 参考:
|
Package payment 微信支付 V3 - 商家转账(用户确认收款模式,单笔) 参考: |