Documentation ¶
Index ¶
- Variables
- func AddSecondToTime(second int64) (timestamp int64, Time time.Time, timeStr string)
- func AesDecrypt(encrypted []byte, key []byte) ([]byte, error)
- func AesDecryptBase64(str, key string) (string, error)
- func AesEncrypt(origData []byte, key []byte) ([]byte, error)
- func AesEncryptBase64(str, key string) (string, error)
- func CheckEmailRule(email string) bool
- func CheckIdNumRule(idNum string) bool
- func CheckMobileNumRule(mobile string) bool
- func Float32ToString(f float64) string
- func Float64ToString(f float64) string
- func Int64ToInt(i64 int64) int
- func Int64ToString(i64 int64) string
- func Md5(str string) string
- func NowDataTime() time.Time
- func NowDataTimeFmtStr() string
- func NowDataTimeStr() string
- func NowTime() (timestamp int64, Time time.Time, timeStr string)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) ([]byte, error)
- func Sha1(str string) string
- func StrToInt64(str string) (int64, error)
- func TimeStrToTime(str string) (timestamp int64, Time time.Time)
- func TimestampToTime(timestamp int64) (Time time.Time, timeStr string)
- func TodayDataTimeEnd() (timestamp int64, Time time.Time, timeStr string)
- func TodayDataTimeStart() (timestamp int64, Time time.Time, timeStr string)
- func UrlDecode(str string) (url string)
- func UrlEncode(url string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeLayout string = "2006-01-02 15:04:05"
Functions ¶
func AddSecondToTime ¶ added in v0.0.3
AddSecondToTime 在当前时间戳的基础上加上秒数,重新生成时间日期
func AesDecrypt ¶ added in v0.0.6
AesDecrypt 实现解密
func AesDecryptBase64 ¶ added in v0.0.6
AesDecryptBase64 base64解密
func AesEncrypt ¶ added in v0.0.6
AesEncrypt 实现加密
func AesEncryptBase64 ¶ added in v0.0.6
AesEncryptBase64 加密为base64
func CheckEmailRule ¶ added in v0.0.2
func CheckIdNumRule ¶ added in v0.0.2
func CheckMobileNumRule ¶ added in v0.0.2
func Float32ToString ¶ added in v0.0.2
Float32ToString float32转string
func Float64ToString ¶ added in v0.0.2
Float64ToString float64转string
func Int64ToString ¶ added in v0.0.2
Int64ToString int64转string
func NowDataTime ¶ added in v0.0.2
func NowDataTimeFmtStr ¶ added in v0.0.2
func NowDataTimeFmtStr() string
func NowDataTimeStr ¶ added in v0.0.2
func NowDataTimeStr() string
func PKCS7Padding ¶ added in v0.0.6
PKCS7Padding PKCS7 填充模式
func PKCS7UnPadding ¶ added in v0.0.6
PKCS7UnPadding 填充的反向操作,删除填充字符串
func TimeStrToTime ¶ added in v0.0.2
TimeStrToTime 将时间字符串转为时间戳和time.Time(例如:2021-08-08 08:08:08)
func TimestampToTime ¶ added in v0.0.4
TimestampToTime 时间戳转日期格式
func TodayDataTimeEnd ¶ added in v0.0.2
TodayDataTimeEnd 今日23:59:59时间
func TodayDataTimeStart ¶ added in v0.0.2
TodayDataTimeStart 今日凌晨时间
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.