# Functions
DecodeBytesToUint32 从 4 字节的网络字节序里解析出整数 uint32.
EncodeUint32ToBytes 把整数 uint32 格式化成 4 字节的网络字节序.
FormatMap2XML format map to xml.
FormatMap2XMLForTest 用于单元测试.
HMacSHA256 generates a keyed sha256 hash value.
HTTPDo sends an HTTP request and returns an HTTP response.
HTTPGet issues a GET to the specified URL.
HTTPPost issues a POST to the specified URL.
HTTPPostForm issues a POST to the specified URL, with data's keys and values URL-encoded as the request body.
HTTPUpload issues a UPLOAD to the specified URL.
LoadCertFromPfxFile 通过pfx(p12)证书文件生成TLS证书.
MarshalNoEscapeHTML marshal with no escape HTML.
MD5 calculates the md5 hash of a string.
NewAction returns a new action.
NewCBCCrypto returns a new aes-cbc crypto.
NewDefaultClient returns a default http client.
NewECBCrypto returns a new aes-ecb crypto.
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.
NewGetAction returns a new action with GET method.
NewHTTPClient returns a new http client.
NewPostAction returns a new action with POST method.
NewPrivateKeyFromPemBlock returns new private key with pem block.
NewPrivateKeyFromPemFile returns new private key with pem file.
NewPrivateKeyFromPfxFile returns private key with pfx(p12) file.
NewPublicKeyFromDerBlock returns public key with DER block.
NewPublicKeyFromDerFile returns public key with DER file.
NewPublicKeyFromPemBlock returns new public key with pem block.
NewPublicKeyFromPemFile returns new public key with pem file.
NewUploadForm returns an upload form.
Nonce returns nonce string, param `size` better for even number.
ParseXML2Map parse xml to map.
No description provided by the author
No description provided by the author
SHA1 calculates the sha1 hash of a string.
SHA256 calculates the sha256 hash of a string.
WithBody sets post body for action.
WithDebug debug mode.
WithDecode sets response decode for action.
WithFormField specifies the form field to upload from.
WithFormFile specifies the file field to upload from.
WithHTTPClose specifies close the connection after replying to this request (for servers) or after sending this request and reading its response (for clients).
WithHTTPCookies specifies the cookies to http request.
WithHTTPHeader specifies the header to http request.
WithQuery sets query params for action.
WithTLS sets request with tls for action.
WithUpload sets uploadform for action.
WithWXML sets post with xml for action.
No description provided by the author
No description provided by the author
# Constants
AES_PKCS5 PKCS#5 padding mode.
AES_PKCS7 PKCS#7 padding mode.
AES_ZERO zero padding mode.
RSA_PKCS1 this kind of key is commonly encoded in PEM blocks of type "RSA PRIVATE KEY" and "RSA PUBLIC KEY".
RSA_PKCS8 this kind of key is commonly encoded in PEM blocks of type "PRIVATE KEY" and "PUBLIC KEY".
No description provided by the author
No description provided by the author
# Interfaces
Action is the interface that handle wechat api.
AESCrypto is the interface for aes crypto.
HTTPClient is the interface for a http client.
UploadForm is the interface for http upload.
# Type aliases
ActionOption configures how we set up the action.
AESPaddingMode aes padding mode.
CDATA XML CDATA section which is defined as blocks of text that are not parsed by the parser, but are otherwise recognized as markup.
FormFileFunc writes file content to multipart writer.
HTTPOption configures how we set up the http request.
M is a convenient alias for a map[string]interface{}.
RSAPaddingMode pem block type which taken from the preamble.
签名类型.
UploadField configures how we set up the upload from.
WXML deal with xml for wechat.