Documentation
¶
Index ¶
- Variables
- func GetMsgEventFromWechatMessage(message []byte) string
- func GetMsgTypeFromWechatMessage(message []byte) string
- func GetRandomString(length int) []byte
- func HTTPGet(url string) ([]byte, error)
- func HTTPPostForm(url string, fields map[string]string, files ...MultipartFormFile) ([]byte, error)
- func HTTPPostJson(url string, obj interface{}) ([]byte, error)
- type MultipartFormFile
- type PublicError
Constants ¶
This section is empty.
Variables ¶
View Source
var WechatErrorLoggerWriter io.Writer = os.Stderr
View Source
var WechatLoggerWriter io.Writer = os.Stdout
Functions ¶
func GetMsgEventFromWechatMessage ¶
从微信事件消息中,提取事件类型
func GetMsgTypeFromWechatMessage ¶
从微信消息中,提取MsgType
func HTTPPostForm ¶
HTTP POST form表单提交 url:文件上传访问路径 fields: 表单字段 files: 表单文件
Types ¶
type MultipartFormFile ¶
type MultipartFormFile struct {
FieldName string // 文件入参名称
FileName string // 文件名称
Reader io.Reader // 文件输入流
}
文件上传结构体
type PublicError ¶
Click to show internal directories.
Click to hide internal directories.