# Functions
Abs abs().
Addslashes addslashes().
实现解密.
实现加密.
ArrayChunk array_chunk().
ArrayColumn array_column().
ArrayCombine array_combine().
ArrayFill array_fill().
ArrayFlip array_flip().
ArrayKeyExists array_key_exists().
ArrayKeys array_keys().
ArrayMerge array_merge().
ArrayPad array_pad().
ArrayPop array_pop() Pop the element off the end of slice.
ArrayPush array_push() Push one or more elements onto the end of slice.
ArrayRand array_rand().
ArrayReverse array_reverse().
ArrayShift array_shift() Shift an element off the beginning of slice.
ArraySlice array_slice().
ArrayUnshift array_unshift() Prepend one or more elements to the beginning of a slice.
ArrayValues array_values().
Base64Decode base64_decode().
Base64Encode base64_encode().
Base64MapDecode 将base64.
Base64MapEncode 将map转化为base64.
Base64URLDecode.
Base64URLEncode.
BaseConvert base_convert().
Basename basename().
Bin2hex bin2hex().
Bindec bindec().
转换为驼峰形式.
Ceil ceil().
Chmod chmod().
Chown chown().
Chr chr().
ChunkSplit chunk_split().
Copy copy().
Date date() Date("02/01/2006 15:04:05 PM", 1524799394).
base64解码.
Decbin decbin().
Dechex dechex().
Decoct decoct().
DecryptAES256GCM 使用 AEAD_AES_256_GCM 算法进行解密
你可以使用此算法完成微信支付平台证书和回调报文解密,详见: https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/zheng-shu-he-hui-tiao-bao-wen-jie-mi.
校验JWT @param string encryptedString 加密的JWT字符串 @param string encryptKey 加密密钥 @param interface{} v 解密后的数据.
DecryptOAEP 使用私钥进行解密.
验证密码 @param string encryptedPassword 加密后的密码 @param string password 明文密码 @return bool.
Delete delete().
Die die().
Echo echo.
Empty empty().
将加密的结果进行base64编码.
EncryptJWT JWT加密 @param map[string]interface{} data 要加密的数据 @param string encryptKey 加密密钥 @return string 生成的JWT字符串.
EncryptOAEPWithCertificate 先解析出证书中的公钥,然后使用公钥进行加密.
EncryptOAEPWithPublicKey 使用公钥进行加密.
EncryptPassword 加密密码 @param string password 要加密的密码 @return string 加密后密码 @return error 错误.
Exit exit().
Explode explode().
Fclose fclose().
Fgetcsv fgetcsv().
FileExists file_exists().
FileGetContents file_get_contents().
Filemtime filemtime().
FilePutContents file_put_contents().
FileSize filesize().
Floor floor().
GenerateNonce 生成一个长度为 NonceLength 的随机字符串(只包含大小写字母与数字).
获取AST.
GetCertificateSerialNumber 从证书中获取证书序列号.
Getcwd getcwd().
Getenv getenv().
获取协程ID.
Gethostbyaddr gethostbyaddr() Get the Internet host name corresponding to a given IP address.
Gethostbyname gethostbyname() Get the IPv4 address corresponding to a given Internet host name.
Gethostbynamel gethostbynamel() Get a list of IPv4 addresses corresponding to a given Internet host name.
Gethostname gethostname().
生成token.
No description provided by the author
Glob glob().
Hex2bin hex2bin().
Hexdec hexdec().
HMAC hmac加密 @param hash.Hash h 加密的Hash方法 @param string d 要加密的字符串 @param string k 加密密钥.
Htmlentities htmlentities().
HTMLEntityDecode html_entity_decode().
HTTPBuildQuery http_build_query().
Implode implode().
InArray in_array() haystack supported types: slice, array or map.
IP2long ip2long() IPv4.
IsCertExpired 判定证书在特定时间是否过期.
IsCertValid 判定证书在特定时间是否有效.
IsDir is_dir().
判断是否是Email.
IsFile is_file().
是否是IP地址(包含IPV4和IPV6).
是否是IPV4.
判断是否是手机号码.
IsNan is_nan().
IsNumeric is_numeric() Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part.
是否是QQ.
IsReadable is_readable().
是否是网址.
IsWriteable is_writeable().
JSONDecode json_decode().
JSONEncode json_encode().
Lcfirst lcfirst().
LdapLogin 使用LDAP登录.
LoadCertificate 通过证书的文本内容加载证书.
LoadCertificateWithPath 通过证书的文件路径加载证书.
LoadPrivateKey 通过私钥的文本内容加载私钥.
LoadPrivateKeyWithPath 通过私钥的文件路径内容加载私钥.
LoadPublicKey 通过公钥的文本内容加载公钥.
LoadPublicKeyWithPath 通过公钥的文件路径加载公钥.
Long2ip long2ip() IPv4.
Ltrim ltrim().
Max max().
MbStrlen mb_strlen().
Md5 md5().
Md5File md5_file().
MemoryGetUsage memory_get_usage() return in bytes.
获取毫秒级时间戳.
Min min().
Mkdir mkdir().
Nl2br nl2br() \n\r, \r\n, \r, \n.
NumberFormat number_format() decimals: Sets the number of decimal points.
Octdec Octdec().
Ord ord().
Pack pack().
解析路由文件.
ParseStr parse_str() f1=m&f2=n -> map[f1:m f2:n] f[a]=m&f[b]=n -> map[f:map[a:m b:n]] f[a][a]=m&f[a][b]=n -> map[f:map[a:map[a:m b:n]]] f[]=m&f[]=n -> map[f:[m n]] f[a][]=m&f[a][]=n -> map[f:map[a:[m n]]] f[][]=m&f[][]=n -> map[f:[map[]]] // Currently does not support nested slice.
ParseURL parse_url() Parse a URL and return its components -1: all; 1: scheme; 2: host; 4: port; 8: user; 16: pass; 32: path; 64: query; 128: fragment.
Pathinfo pathinfo() -1: all; 1: dirname; 2: basename; 4: extension; 8: filename Usage: Pathinfo("/home/go/path/src/php2go/php2go.go", 1|2|4|8).
Pi pi().
Putenv putenv() The setting, like "FOO=BAR".
Quotemeta quotemeta().
Rand rand() Range: [0, 2147483647].
Rawurldecode rawurldecode().
Rawurlencode rawurlencode().
Realpath realpath().
Rename rename().
Round round().
Rtrim rtrim().
SaveUploadedFile uploads the form file to specific dst.
Sha1 sha1().
Sha1File sha1_file().
SignSHA256WithRSA 通过私钥对字符串以 SHA256WithRSA 算法生成签名信息.
Sleep sleep().
转换为蛇形字符串,例如: XxYy to xx_yy , XxYY to xx_yy.
Stat stat().
Stripos stripos().
Stripslashes stripslashes().
Strlen strlen().
Strpos strpos().
StrRepeat str_repeat().
StrReplace str_replace().
Strrev strrev().
Strripos strripos().
Strrpos strrpos().
StrShuffle str_shuffle().
Strstr strstr().
Strtolower strtolower().
Strtotime strtotime() Strtotime("02/01/2006 15:04:05", "02/01/2016 15:04:05") == 1451747045 Strtotime("3 04 PM", "8 41 PM") == -62167144740.
Strtoupper strtoupper().
Strtr strtr()
If the parameter length is 1, type is: map[string]string Strtr("baab", map[string]string{"ab": "01"}) will return "ba01" If the parameter length is 2, type is: string, string Strtr("baab", "ab", "01") will return "1001", a => 0; b => 1.
StrWordCount str_word_count().
Substr substr().
Ternary Ternary expression max := Ternary(a > b, a, b).(int).
获取秒级时间戳.
Touch touch().
Trim trim().
Ucfirst ucfirst().
Ucwords ucwords().
Uniqid uniqid().
Unlink unlink().
Unpack unpack().
URLDecode urldecode().
URLEncode urlencode().
Usleep usleep().
校验token @param string encryptSecret 加密秘钥 @param string token 要校验的token @param string aud token的接收对象 @param string ip token使用的IP地址.
VersionCompare version_compare() The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
Wordwrap wordwrap().
ZipOpen zip_open().
# Constants
用于定义GET请求的URL,如:@get /users/api/list.
用于定义中间件,如:@mid VerifyUser VerifyIP.
用于定义API名称,如:@api 用户列表.
用于参数说明,如:@params id 用户ID.
用于定义POST请求的URL,如:@post /users/api/save.
用于自定义参数,如:@request ip app.GetIP().
JS类型注解.
名称注解.
标签注解.
管理员 aud.
代理商 aud.
店铺 aud.
学生 aud.
老师 aud.
用户 aud.
# Variables
No description provided by the author
# Structs
文件.
方法.
引用.
参数.
返回值.
结构体.
结构体字段.
JWT.
生成JWT请求对象.
No description provided by the author
ldap配置
*/.
LdapUser LDAP用户.