Documentation ¶
Index ¶
- Constants
- type CDATA
- type EncryptRequestBody
- type EncryptResponseBody
- type PassiveUserReplyMessage
- type TextRequestBody
- type WeiXin
- func (w *WeiXin) EncodingAESKey2AESKey() []byte
- func (w *WeiXin) MakeEncryptResponseBody(fromUserName, toUserName, content, nonce, timestamp string) ([]byte, error)
- func (w *WeiXin) MakeEncryptXmlData(fromUserName, toUserName, timestamp, content string) (string, error)
- func (w *WeiXin) MakeMsgSignature(timestamp, nonce, msgEncrypt string) string
- func (w *WeiXin) MakeSignature(timestamp, nonce string) string
- func (w *WeiXin) PKCS7Pad(message []byte, blockSize int) (padded []byte)
- func (w *WeiXin) PadLength(sliceLength, blockSize int) (padLen int)
- func (w *WeiXin) ParseEncryptRequestBody(timestamp, nonce, msgSignature string, rawBody []byte) (*TextRequestBody, error)
- func (w *WeiXin) ParseEncryptTextRequestBody(plainText []byte) (*EncryptRequestBody, error)
- func (w *WeiXin) ValidateAppId(id []byte) bool
- func (w *WeiXin) ValidateMsg(timestamp, nonce, msgEncrypt, msgSignatureIn string) bool
- type WeiXinMsgType
Constants ¶
View Source
const ( EncryptTypeAES = "aes" EncryptTypeRAW = "raw" )
View Source
const ( WeiXinSubscribeEvent = "subscribe" WeiXinUnsubscribeEvent = "unsubscribe" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptRequestBody ¶
type EncryptResponseBody ¶
type PassiveUserReplyMessage ¶
type PassiveUserReplyMessage struct { XMLName xml.Name `xml:"xml"` ToUserName CDATA `xml:"ToUserName"` FromUserName CDATA `xml:"FromUserName"` CreateTime CDATA `xml:"CreateTime"` MsgType CDATA `xml:"MsgType"` Content CDATA `xml:"Content"` }
func (*PassiveUserReplyMessage) String ¶
func (p *PassiveUserReplyMessage) String() string
type TextRequestBody ¶
type WeiXin ¶
type WeiXin struct {
// contains filtered or unexported fields
}
func (*WeiXin) EncodingAESKey2AESKey ¶
func (*WeiXin) MakeEncryptResponseBody ¶
func (*WeiXin) MakeEncryptXmlData ¶
func (*WeiXin) MakeMsgSignature ¶
func (*WeiXin) MakeSignature ¶
func (*WeiXin) ParseEncryptRequestBody ¶
func (w *WeiXin) ParseEncryptRequestBody(timestamp, nonce, msgSignature string, rawBody []byte) (*TextRequestBody, error)
func (*WeiXin) ParseEncryptTextRequestBody ¶
func (w *WeiXin) ParseEncryptTextRequestBody(plainText []byte) (*EncryptRequestBody, error)
func (*WeiXin) ValidateAppId ¶
func (*WeiXin) ValidateMsg ¶
type WeiXinMsgType ¶
type WeiXinMsgType string
const ( WeiXinTextMsgType WeiXinMsgType = "text" WeiXinImageMsgType WeiXinMsgType = "image" WeiXinVoiceMsgType WeiXinMsgType = "voice" WeiXinVideoMsgType WeiXinMsgType = "video" WeiXinMusicMsgType WeiXinMsgType = "music" WeiXinNewsMsgType WeiXinMsgType = "news" WeiXinEventMsgType WeiXinMsgType = "event" )
Click to show internal directories.
Click to hide internal directories.