package
3.0.4
Repository: https://github.com/keepchen/go-sail.git
Documentation: pkg.go.dev

# Functions

AesDecode aes解密 使用CFB key应该是一个16或24或32位长度的字符.
AesEncode aes加密 使用CFB key应该是一个16或24或32位长度的字符.
Base64Decode base64解码.
Base64Encode base64编码.
CharCodeAt 返回字符对应的ASCII码.
Crc32Checksum 求crc32校验码.
Crc32ChecksumIEEE 求crc32校验码 使用IEEE多项式.
Crc64Checksum 求crc64校验码.
Crc64ChecksumECMA 求crc64校验码 使用ECMA多项式.
FileAppendContents 将内容写入文件(追加写) content []byte 写入的内容 dst string 写入的目标地址.
FileExists 检查文件上是否存在 dst string 目标地址.
FileExistsWithError 检查文件上是否存在(会返回错误信息) dst string 目标地址.
FileExt 获取文件扩展名 根据文件名最后一个.分隔来切分获取.
FileGetContents 获取文件内容 filename string 文件地址.
FileGetContentsReadLine 逐行读取文件内容.
FilePutContents 将内容写入文件(覆盖写) content []byte 写入的内容 dst string 写入的目标地址.
FormatDate 时间对象转字符串.
FromCharCode 返回ASCII码对应的字符 # Note 常规ASCII码表范围为0~127 扩展ASCII码表范围为128~255 more: https://www.rfc-editor.org/rfc/rfc698.txt.
GenerateVAPIDKeys 生成web push的公私钥.
GetLocalIP 获取本地ip地址(单播地址).
ListeningExitSignal 监听系统退出信号.
MD5Encode md5编码.
NewHeap 初始化一个全新的堆 它的作用是可以对任意数据类型的切片进行排序 实现 IAnyValue.SortByAsc 方法可以指定排序规则(升序、降序) IAnyValue.GetScore 方法是排序的数值依据.
NewTimeWithTimeZone 根据时区初始化时间 默认时区: Asia/Shanghai.
ParseDate 解析时间 string解析到time对象.
PrintSwaggerControllerInfo 打印swagger控制器信息 用于生成swagger注释.
PrintSwaggerSummaryInfo 打印swagger概览信息参数 用于生成swagger注释.
No description provided by the author
RandomComplexString 随机字符串(可带特殊符号).
RandomDigitalChars 随机字符串(数字).
RandomLetters 随机字符串(字母).
RandomString 随机字符串(字母+数字).
RedisClusterLock redis锁-上锁(使用cluster) using SetNX.
RedisClusterLockWithContext redis锁-上锁(使用cluster) using SetNX.
RedisClusterUnlock redis锁-解锁(使用cluster) using SetNX.
RedisClusterUnlockWithContext redis锁-解锁(使用cluster) using SetNX.
RedisLock redis锁-上锁(自动推测连接类型) using SetNX 与之对应的是使用 RedisUnlock 解锁 # Note 该方法会阻塞住线程直到上锁成功 或者 触发ctx.Done().
RedisStandaloneLock redis锁-上锁(使用standalone) using SetNX.
RedisStandaloneLockWithContext redis锁-上锁(使用standalone) using SetNX.
RedisStandaloneUnlock redis锁-解锁(使用standalone) using SetNX.
RedisStandaloneUnlockWithContext redis锁-解锁(使用standalone) using SetNX.
RedisTryLock redis锁-尝试上锁(自动推测连接类型) using SetNX 与之对应的是使用 RedisUnlock 解锁 # Note 该方法会立即返回锁定成功与否的结果.
RedisTryLockWithContext redis锁-尝试上锁(自动推测连接类型) using SetNX 与之对应的是使用 RedisUnlock 解锁 # Note 该方法会立即返回锁定成功与否的结果.
RedisUnlock redis锁-解锁(自动推测连接类型) using SetNX.
RedisUnlockWithContext redis锁-解锁(自动推测连接类型) using SetNX.
RSADecrypt rsa解密.
RSAEncrypt rsa加密.
RSASign rsa加签.
RSAVerifySign rsa验签.
SaveFile2Dst 将文件保存到目标地址(拷贝文件) file *multipart.FileHeader 文件 dst string 拷贝到的目标地址.
SendNotification 发送通知.
SM4ECBDecrypt ECB解密 hexKey 16进制key 长度32位 base64Raw 加密内容 base64格式.
SM4ECBEncrypt ECB加密 hexKey 16进制key 长度32位 raw 待加密内容.
StringPaddingBoth 向两端填充字符串 rawString 原字符 padChar 填充字符 length 最终字符长度 # Note 如果填充长度不能均分,那么右侧多填充一个字符,如: rawString = "a",padChar = "#",length = 4 则: result = "#a##".
StringPaddingLeft 向左填充字符串 rawString 原字符 padChar 填充字符 length 最终字符长度.
StringPaddingRight 向右填充字符串 rawString 原字符 padChar 填充字符 length 最终字符长度.
StringReverse 翻转字符串.
StringShuffle 打乱字符串.
ValidateEmail 验证邮箱格式.
ValidateIdentityCard (中国大陆)身份证格式校验 计算规则参考“中国国家标准化管理委员会” 官方文档@see http://www.gb688.cn/bzgk/gb/newGbInfo?hcno=080D6FBF2BB468F9007657F26D60013E.
Wordwrap 以给定的字符和长度来打断字符串.
WrapRedisKey 包装redis键名 给redis的键加入应用名前缀,如: appName=game key=user 最终的redis键名为:game:user 此方法的主要作用是按应用来划分redis键名.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
KEY 密钥.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
Payload 消息推送载荷.
PayloadDataField 消息推送载荷-data字段.
SwaggerControllerInfoParam 控制器信息参数.
SwaggerSummaryInfoParam 概览信息参数.
No description provided by the author
VersionInfoFields 版本信息字段.

# Interfaces

No description provided by the author
IAnyValue 任意值接口.

# Type aliases

No description provided by the author
DateStyle 日期格式.