Documentation ¶
Index ¶
- Constants
- func BytesToString(ss []byte) string
- func Crc16(bs []byte) (crc uint16)
- func DecodeInt64(i string, key uint64) (int64, error)
- func DecryptInt64(i string, key []byte) (int64, error)
- func EncodeInt64(i int64, key uint64) string
- func EncryptInt64(i int64, key []byte) (string, error)
- func FormatDate(secs int64, layout string) string
- func GetCurrentDT() int32
- func GetCurrentTimeStamp() int64
- func GetDT(t time.Time) int32
- func GetValuesOfSlice(v interface{}, key string) (interface{}, error)
- func IntefaceSlice(v interface{}) []interface{}
- func JoinRunes(arr []rune, sep string) string
- func JoinSlice(arr interface{}, sep string) (ret string, err error)
- func JsonEncode(v interface{}) string
- func Md5hex(input string) string
- func Md5s(input string) string
- func RandomString(len int) string
- func RedisGzipGet(ctx context.Context, redisClient *redis.Client, key string) ([]byte, error)
- func RedisGzipSet(ctx context.Context, redisClient *redis.Client, key string, data []byte, ...) error
- func Sha1s(input string) string
- func Sha256s(input string) string
- func SliceStringToInt(arr []string) []int
- func SubCipher(chars []rune, n int) [][]rune
- func SubCipherDecode(cipher [][]rune, s string, min int) int
- func SubCipherEncode(cipher [][]rune, input int, min int) string
Constants ¶
View Source
const DATE_FORMAT_DATE = "2006-01-02"
View Source
const DATE_FORMAT_DT = "20060102"
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
func EncryptInt64 ¶
key []byte 32/24/16 bytes
func FormatDate ¶
func GetCurrentTimeStamp ¶
func GetCurrentTimeStamp() int64
func GetValuesOfSlice ¶
GetValuesOfSlice - 将对象数组的值塞到另一个数组里
func JsonEncode ¶
func JsonEncode(v interface{}) string
func RedisGzipGet ¶
读取并解压
func RedisGzipSet ¶
func RedisGzipSet(ctx context.Context, redisClient *redis.Client, key string, data []byte, expired time.Duration) error
压缩存储
func SliceStringToInt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.