Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chanxuehong/wechat
/ functions
Functions
669 in github.com/chanxuehong/wechat
⨍
Functions
669
◇
Types & classes
332
↓ 1 callers
Function
DebugPrintRequest
(r *http.Request)
internal/debug/callback/release.go:12
↓ 1 callers
Function
DebugPrintRequestMessage
(msg []byte)
internal/debug/mch/callback/release.go:15
↓ 1 callers
Function
DecodeXMLHttpResponse
(r io.Reader)
internal/debug/mch/api/release.go:16
↓ 1 callers
Method
DefaultEventHandleFunc
DefaultEventHandleFunc 设置 handlers 以处理没有匹配到具体类型的 HandlerChain 的事件.
mp/core/handler.go:261
↓ 1 callers
Method
DefaultMsgHandleFunc
DefaultMsgHandleFunc 设置 handlers 以处理没有匹配到具体类型的 HandlerChain 的消息.
mp/core/handler.go:229
↓ 1 callers
Function
DownloadToWriter
DownloadToWriter 下载多媒体到 io.Writer. 请注意, 视频文件不支持下载
mp/media/download.go:38
↓ 1 callers
Function
DownloadToWriter
DownloadToWriter 下载多媒体到 io.Writer. 对于视频素材, 先通过 GetVideo 得到 Video 信息, 然后通过 Video.DownloadURL 来下载
mp/material/download.go:40
↓ 1 callers
Function
DownloadToWriter
DownloadToWriter 通过ticket换取二维码, 写入到 writer. 如果 clt == nil 则默认用 util.DefaultHttpClient.
mp/qrcode/download.go:40
↓ 1 callers
Method
EventHandleFunc
EventHandleFunc 设置 handlers 以处理特定类型的事件.
mp/core/handler.go:325
↓ 1 callers
Method
Expired
Expired 判断 token.AccessToken 是否过期, 过期返回 true, 否则返回 false.
oauth2/oauth2.go:29
↓ 1 callers
Function
GetImage
(msg *core.MixedMsg)
mp/message/callback/request/msg.go:45
↓ 1 callers
Function
GetLink
(msg *core.MixedMsg)
mp/message/callback/request/msg.go:145
↓ 1 callers
Function
GetLocation
(msg *core.MixedMsg)
mp/message/callback/request/msg.go:124
↓ 1 callers
Function
GetLocationEvent
(msg *core.MixedMsg)
mp/message/callback/request/event.go:93
↓ 1 callers
Function
GetScanEvent
(msg *core.MixedMsg)
mp/message/callback/request/event.go:74
↓ 1 callers
Function
GetSession
GetSession 获取小程序会话
mp/oauth2/session.go:37
↓ 1 callers
Function
GetSessionInfo
GetSessionInfo 解密小程序会话加密信息
mp/oauth2/session.go:90
↓ 1 callers
Function
GetShortVideo
(msg *core.MixedMsg)
mp/message/callback/request/msg.go:104
↓ 1 callers
Function
GetText
(msg *core.MixedMsg)
mp/message/callback/request/msg.go:27
↓ 1 callers
Method
GetToken
GetToken 获取 Token, autoRefresh 为 true 时如果 Token 过期则自动刷新.
oauth2/client.go:28
↓ 1 callers
Function
GetUnsubscribeEvent
(msg *core.MixedMsg)
mp/message/callback/request/event.go:57
↓ 1 callers
Function
GetVideo
(msg *core.MixedMsg)
mp/message/callback/request/msg.go:86
↓ 1 callers
Function
GetVoice
(msg *core.MixedMsg)
mp/message/callback/request/msg.go:67
↓ 1 callers
Function
JsapiSign
jssdk 支付签名, signType 只支持 "MD5", "SHA1", 传入其他的值会 panic.
mch/core/sign.go:65
↓ 1 callers
Method
MchId
()
mch/core/server.go:91
↓ 1 callers
Function
MicroPay
MicroPay 提交刷卡支付.
mch/pay/micropay.go:13
↓ 1 callers
Method
MsgHandleFunc
MsgHandleFunc 设置 handlers 以处理特定类型的消息.
mp/core/handler.go:293
↓ 1 callers
Function
NewEndpoint
(AppId, AppSecret string)
mp/oauth2/endpoint.go:17
↓ 1 callers
Function
NewServeMux
()
mp/core/handler.go:43
↓ 1 callers
Function
NewServer
NewServer 创建一个新的 Server. oriId: 可选; 公众号的原始ID(微信公众号管理后台查看), 如果设置了值则该Server只能处理 ToUserName 为该值的公众号的消息(事件); appId: 可选; 公众号的AppId, 如果设置了值
mp/core/server.go:67
↓ 1 callers
Method
Next
Next 中断当前 handler 程序逻辑执行其后续的 handlers, 一般在 middleware 中调用.
mch/core/context.go:41
↓ 1 callers
Function
OrderQuery
OrderQuery 查询订单.
mch/pay/orderquery.go:13
↓ 1 callers
Method
PutToken
(*Token)
oauth2/oauth2.go:14
↓ 1 callers
Function
QrcodePicURL
二维码图片的URL, 可以通过此URL下载二维码 或者 在线显示此二维码.
mp/qrcode/download.go:15
↓ 1 callers
Method
RefreshTicket
(currentTicket string)
mp/jssdk/ticket_server.go:67
↓ 1 callers
Method
RefreshTicket
type refreshTicketResult struct { ticket string err error }
mp/jssdk/card_ticket_server.go:67
↓ 1 callers
Method
RefreshToken
(currentToken string)
mp/core/access_token_server.go:76
↓ 1 callers
Function
Refund
Refund 申请退款. NOTE: 请求需要双向证书.
mch/pay/refund.go:14
↓ 1 callers
Function
RefundQuery
RefundQuery 查询退款.
mch/pay/refundquery.go:13
↓ 1 callers
Function
Report
Report 交易保障.
mch/payutil/report.go:12
↓ 1 callers
Function
Reverse
Reverse 撤销订单. NOTE: 请求需要双向证书.
mch/pay/reverse.go:11
↓ 1 callers
Method
ServeHTTP
ServeHTTP 处理微信服务器的回调请求, query 参数可以为 nil.
mp/core/server.go:197
↓ 1 callers
Method
Set
Set 存储 key-value pair 到 Context 中.
mch/core/context.go:79
↓ 1 callers
Function
ShortURL
ShortURL 将一条长链接转成短链接.
mp/base/shorturl.go:8
↓ 1 callers
Function
ShortURL
ShortURL 转换短链接.
mch/tools/shorturl.go:9
↓ 1 callers
Method
SubAppId
()
mch/core/server.go:98
↓ 1 callers
Method
SubMchId
()
mch/core/server.go:101
↓ 1 callers
Function
UnifiedOrder
UnifiedOrder 统一下单.
mch/pay/unifiedorder.go:13
↓ 1 callers
Function
UploadHeadImageFromReader
UploadHeadImageFromReader 上传客服头像. NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.
mp/dkf/account/head_img.go:25
↓ 1 callers
Function
UploadImageFromReader
UploadImageFromReader 上传图片到微信服务器, 返回的图片url给其他场景使用, 比如图文消息, 卡卷, POI. NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.
mp/base/uploadimg.go:25
↓ 1 callers
Function
UploadImageFromReader
UploadImageFromReader 上传多媒体图片 NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.
mp/material/upload.go:37
↓ 1 callers
Function
UploadThumbFromReader
UploadThumbFromReader 上传多媒体缩略图. NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.
mp/media/upload.go:115
↓ 1 callers
Function
UploadThumbFromReader
UploadThumbFromReader 上传多媒体缩略图 NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.
mp/material/upload.go:81
↓ 1 callers
Function
UploadVideoFromReader
UploadVideoFromReader 上传多媒体缩视频. NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.
mp/material/upload.go:167
↓ 1 callers
Function
UploadVoiceFromReader
UploadVoiceFromReader 上传多媒体语音 NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.
mp/material/upload.go:125
↓ 1 callers
Method
UseFunc
UseFunc 注册(新增) middlewares 使其在所有消息(事件)的 Handler 之前处理该处理消息(事件).
mp/core/handler.go:118
↓ 1 callers
Method
UseFuncForEvent
UseFuncForEvent 注册(新增) middlewares 使其在所有事件的 Handler 之前处理该处理事件.
mp/core/handler.go:190
↓ 1 callers
Method
UseFuncForMsg
UseFuncForMsg 注册(新增) middlewares 使其在所有消息的 Handler 之前处理该处理消息.
mp/core/handler.go:151
↓ 1 callers
Function
XmlEncodeResponseMessage
(w io.Writer, msg interface{})
internal/debug/callback/release.go:20
↓ 1 callers
Function
XmlMarshalResponseMessage
(msg interface{})
internal/debug/callback/release.go:16
↓ 1 callers
Function
abs
(x time.Duration)
mp/core/access_token_server.go:117
↓ 1 callers
Function
combineHandlerChain
(middlewares, handlers HandlerChain)
mch/core/handler.go:49
↓ 1 callers
Function
decodeNetworkByteOrder
从 4 字节的网络字节序里解析出整数
internal/util/aes_crypto.go:18
↓ 1 callers
Function
encodeNetworkByteOrder
把整数 n 格式化成 4 字节的网络字节序
internal/util/aes_crypto.go:10
↓ 1 callers
Method
getEventHandlerChain
getEventHandlerChain 获取 HandlerChain 以处理事件类型为 EventType 的事件, 如果没有找到返回 nil.
mp/core/handler.go:88
↓ 1 callers
Method
getMsgHandlerChain
getMsgHandlerChain 获取 HandlerChain 以处理消息类型为 MsgType 的消息, 如果没有找到返回 nil.
mp/core/handler.go:75
↓ 1 callers
Method
httpClient
()
oauth2/client.go:20
↓ 1 callers
Function
httpDownloadToWriter
(clt *http.Client, url string, writer io.Writer, errorResult *core.Error)
mp/media/download.go:85
↓ 1 callers
Function
httpDownloadToWriter
(clt *http.Client, url string, body []byte, buf []byte, writer io.Writer, errorResult *core.Error)
mp/material/download.go:110
↓ 1 callers
Function
httpGetJSON
(clt *http.Client, url string, response interface{})
mp/core/client.go:89
↓ 1 callers
Function
httpPostJSON
(clt *http.Client, url string, body []byte, response interface{})
mp/core/client.go:170
↓ 1 callers
Function
httpPostMultipartForm
(clt *http.Client, url, bodyType string, body []byte, response interface{})
mp/core/client_upload.go:117
↓ 1 callers
Function
isSpace
(b byte)
mp/material/download.go:160
↓ 1 callers
Function
isSpace
(b byte)
mch/pay/downloadbill.go:179
↓ 1 callers
Method
postXML
(url string, body []byte, reqSignType string)
mch/core/client.go:157
↓ 1 callers
Method
removeLastAESKey
(lastAESKey []byte)
mp/core/server.go:181
↓ 1 callers
Method
start
()
mp/core/started_checker.go:20
↓ 1 callers
Function
switchRequestURL
(url string)
mch/core/client.go:286
↓ 1 callers
Method
ticketUpdateDaemon
(initTickDuration time.Duration)
mp/jssdk/ticket_server.go:73
↓ 1 callers
Method
ticketUpdateDaemon
(initTickDuration time.Duration)
mp/jssdk/card_ticket_server.go:73
↓ 1 callers
Method
tokenUpdateDaemon
(initTickDuration time.Duration)
mp/core/access_token_server.go:82
↓ 1 callers
Function
trimLeft
(s []byte)
mp/material/download.go:150
Method
AESResponse
AESResponse 回复aes加密的消息给微信服务器. msg: 经过 encoding/xml.Marshal 得到的结果符合微信消息格式的任何数据结构 timestamp: 时间戳, 如果为 0 则默认使用 Context.Timestamp nonce: 随机数
mp/core/context.go:137
Method
Abort
Abort 阻止系统调用当前 handler 后续的 handlers, 即当前的 handler 处理完毕就返回, 一般在 middleware 中调用.
mp/core/context.go:53
Method
Abort
Abort 阻止系统调用当前 handler 后续的 handlers, 即当前的 handler 处理完毕就返回, 一般在 middleware 中调用.
mch/core/context.go:36
Function
Activate
激活/绑定会员卡
mp/card/membercard/activate.go:25
Function
Add
Add 创建门店.
mp/poi/add.go:35
Function
Add
Add 添加客服账号. account: 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。 nickname: 客服昵称,最长6个汉字或12个英文字符 password: 客服账号登录密码 isPas
mp/dkf/account/account.go:18
Function
Add
添加设备
mp/bizwifi/device/add.go:15
Function
Add
新增页面
mp/shakearound/page/add.go:16
Function
Add
(clt *core.Client, imagePath, _type string)
mp/shakearound/material/add.go:17
Function
AddConditionalMenu
创建个性化菜单.
mp/menu/api_conditional.go:8
Function
AddFromReader
(clt *core.Client, filename string, reader io.Reader, _type string)
mp/shakearound/material/add.go:27
Function
AddNews
新增永久图文素材.
mp/material/news.go:25
Function
AddPrivateTemplate
从行业模板库选择模板添加到账号后台, 并返回模板id. templateIdShort: 模板库中模板的编号, 有"TM**"和"OPENTMTM**"等形式.
mp/message/template/template.go:58
Method
AppId
()
mp/core/server.go:45
Method
AppId
()
mch/core/client.go:30
Method
AppendHandlerFunc
(handlers ...func(*Context))
mch/core/handler.go:21
Function
ApplyId
申请设备ID
mp/shakearound/device/applyid.go:21
Function
Auth
Auth 检验授权凭证 access_token 是否有效. accessToken: 网页授权接口调用凭证 openId: 用户的唯一标识 httpClient: 如果不指定则默认为 util.DefaultHttpClient
open/oauth2/oauth2.go:29
← previous
next →
101–200 of 669, ranked by callers