MCPcopy Create free account

hub / github.com/chanyipiaomiao/hltool / functions

Functions82 in github.com/chanyipiaomiao/hltool

↓ 6 callersMethodlogrusEntry
logrusEntry 返回logrusEntry
log.go:24
↓ 4 callersMethodtable
table 获取表 表不存在则创建
boltdb.go:37
↓ 2 callersFunctionIsExist
IsExist 文件或目录是否存在 return false 表示文件不存在
path.go:16
↓ 2 callersFunctionWriteRSAKeyPair
WriteRSAKeyPair 生成RSA密钥对
rsa.go:84
↓ 2 callersFunctiondecodeBytesCreateFile
(imgbytes []byte, filepath string)
image.go:20
↓ 2 callersFunctionsetNull
setNull 相当于/dev/null
log.go:158
↓ 2 callersFunctionsplit
(buf []byte, lim int)
rsa.go:261
↓ 2 callersFunctiontoBytes
(value int64)
twofactorauth.go:19
↓ 2 callersFunctiontoUint32
(bytes []byte)
twofactorauth.go:29
↓ 1 callersFunctionBytesToFile
BytesToFile 字节数组写入到文件
file.go:9
↓ 1 callersFunctionImageType
ImageType 探测图片的类型 imgbytes 图片字节数组
image.go:16
↓ 1 callersFunctionMarshalPKCS8PrivateKey
MarshalPKCS8PrivateKey 私钥解析
rsa.go:244
↓ 1 callersFunctionQRCodeParse
QRCodeParse 二维码图片解析
qrcode.go:9
↓ 1 callersFunctionReadRSAKeyPair
ReadRSAKeyPair 读取RSA密钥对 pubKeyFilename: 公钥文件名称 priKeyFilename: 私钥文件名
rsa.go:126
↓ 1 callersMethodSendMessage
()
notice.go:5
↓ 1 callersMethodSet
Set 设置值 kv 键值对
boltdb.go:55
↓ 1 callersFunctioncheckSecret
checkSecret 检查输入的secret的长度是否符合base32编码规则
twofactorauth.go:35
↓ 1 callersFunctionconvertSecret
(secret string)
twofactorauth.go:44
↓ 1 callersFunctiononeTimePassword
(key []byte, value []byte)
twofactorauth.go:53
↓ 1 callersFunctiononeTimePasswordSHA256
(key []byte, value []byte)
twofactorauth.go:81
↓ 1 callersFunctionpKCS7Padding
(ciphertext []byte, blockSize int)
aes.go:9
↓ 1 callersFunctionpKCS7UnPadding
(origData []byte)
aes.go:15
↓ 1 callersFunctiontotpURLParse
totpURLParse totpURL解析
twofactorauth.go:110
MethodBackup
Backup 备份数据库文件
boltdb.go:149
FunctionBinFileToStruct
BinFileToStruct 二级制文件反序列化为结构体,结构体必须要和转换前的结构一致 filepath 二进制文件路径 to 结构体对象 结构必须和序列化前的一样
serialization.go:28
FunctionBytesToImage
BytesToImage []byte生成图片 imgbytes 图片[]byte数组 filepath 文件路径名称
image.go:36
FunctionBytesToStruct
BytesToStruct []byte转换为结构体,必须事先知道结构体的结构,而且必须一样 data 转换后的字节数组 to 结构体对象 结构必须和序列化前的一样
serialization.go:56
FunctionCryptPassword
CryptPassword 加密密码
secret.go:54
FunctionCurrentDir
CurrentDir 获取当前路径
path.go:8
FunctionCurrentUser
CurrentUser 获取当前SSH连接的用户
user.go:9
MethodDebug
Debug Debug日志
log.go:29
MethodDecrypt
Decrypt 解密数据
aes.go:46
MethodDelete
Delete 删除键值
boltdb.go:128
MethodEncrypt
Encrypt 加密数据
aes.go:32
MethodError
Error Error日志
log.go:44
MethodFatal
Fatal Fatal日志
log.go:49
MethodGenJWToken
GenJWToken 生成一个jwt token
token.go:20
FunctionGenRandomString
GenRandomString 生成随机字符串 length 生成长度 specialChar 是否生成特殊字符
secret.go:15
MethodGet
Get 根据键名数组获取各自的值 keys 键名数组
boltdb.go:77
MethodGetAll
GetAll 获取全部
boltdb.go:102
MethodGetLogger
GetLogger getlogger
log.go:167
FunctionGetMD5
GetMD5 生成32位MD5
secret.go:60
FunctionGetNowTime
GetNowTime 获取当前时间
datetime.go:11
FunctionGetNowTime2
GetNowTime2 获取当前时间
datetime.go:16
FunctionGetNowTimeStamp
GetNowTimeStamp 获取当前的时间戳
datetime.go:21
FunctionImageToBytes
ImageToBytes 图片转换为字节数组 filepath 图片的路径
image.go:68
FunctionInStringSlice
InStringSlice 元素是否在一个string类型的slice里面
array.go:4
MethodInfo
Info Info日志
log.go:34
FunctionIsNumber
IsNumber 检查输入的字符串是否匹配数字
number.go:8
FunctionJSONBytesToFile
JSONBytesToFile json []byte 写入文件
json.go:37
FunctionJSONBytesToStruct
JSONBytesToStruct json []byte 转换为 struct
json.go:28
FunctionJSONFileToBytes
JSONFileToBytes 从json文件中转换为[]byte
json.go:9
FunctionNewBoltDB
NewBoltDB 初始化数据库对象
boltdb.go:22
FunctionNewEmailClient
NewEmailClient 返回一个邮件客户端 host smtp地址 username 用户名 password 密码 port 端口
email.go:53
FunctionNewEmailMessage
NewEmailMessage 返回消息对象 from: 发件人 subject: 标题 contentType: 内容的类型 text/plain text/html attach: 附件 to: 收件人 cc: 抄送人
email.go:27
FunctionNewGoAES
NewGoAES 返回GoAES
aes.go:27
FunctionNewGoRSA
NewGoRSA 初始化 GoRSA对象
rsa.go:146
FunctionNewHLog
NewHLog 返回HLog对象 和 error 目录创建失败
log.go:87
FunctionNewJWToken
NewJWToken 创建JWToken对象
token.go:15
FunctionNewRSAFile
NewRSAFile 生成密钥对文件 pubKeyFilename: 公钥文件名 priKeyFilename: 私钥文件名 kekeyLength: 密钥长度
rsa.go:26
FunctionNewRSAString
NewRSAString 生成密钥对字符串 keyLength 密钥的长度
rsa.go:63
MethodPanic
Panic Panic日志
log.go:54
MethodParseJWToken
ParseJWToken 解析 JWToken
token.go:30
MethodPrivateDecrypt
PrivateDecrypt 私钥解密
rsa.go:201
MethodPublicEncrypt
PublicEncrypt 公钥加密
rsa.go:184
FunctionSendMessage
SendMessage 发送消息
notice.go:9
MethodSendMessage
SendMessage 通过钉钉机器人发送消息
dingtalk.go:24
MethodSendMessage
SendMessage 发送邮件
email.go:64
MethodSetDateFormat
SetDateFormat 设置日期格式 format "%Y-%m-%d" | "%Y%m%d"
log.go:148
MethodSetLevel
SetLevel 设置log level debug|info|warn|error|fatal|panic
log.go:129
MethodSetLogType
SetLogType 设置日志格式 json|text
log.go:111
MethodSetMaxAge
SetMaxAge 设置最大保留时间 单位: 天
log.go:117
MethodSetRotationTime
SetRotationTime 设置日志多久轮转一次 单位: 天
log.go:123
MethodSetSeparateLevelLog
SetSeparateLevelLog 设置是否分离不同级别的日志到不同的文件
log.go:153
MethodSign
Sign 数据进行签名
rsa.go:218
FunctionStructToBinFile
StructToBinFile 结构体序列化成二级制文件 structObj 结构体对象 filepath 文件路径
serialization.go:12
FunctionStructToBytes
StructToBytes 结构体转换为[]byte structObj 结构体对象
serialization.go:43
FunctionTwoStepAuthGenNumber
TwoStepAuthGenNumber 根据提供的 secret 来生成6位数字 返回 6位数字、剩余时间
twofactorauth.go:129
FunctionTwoStepAuthParseQRCode
TwoStepAuthGenByQRCode 解析二维码图片
twofactorauth.go:151
FunctionUserHome
UserHome 获取用户的家目录
user.go:15
MethodVerify
Verify 数据验证签名
rsa.go:231
MethodWarn
Warn Warn日志
log.go:39