Documentation ¶
Index ¶
- func AESBase64Decrypt(encrypted, key, iv string) (clear string, err error)
- func AESBase64Encrypt(clear, key, iv string) (encryoted string, err error)
- func ContainString(list []string, e string) bool
- func Contains(list interface{}, e interface{}) bool
- func DiffDay(a, b interface{}) int
- func Difference(arrs ...interface{}) (reflect.Value, bool)
- func Distinct(arr interface{}) (reflect.Value, bool)
- func FieldSlice(s interface{}, field string) (reflect.Value, bool)
- func FormatTime(ts interface{}) string
- func Generate() string
- func GenerateSessionId(seed string) string
- func HmacSha1(input string, secretKey string) string
- func Intersect(arrs ...interface{}) (reflect.Value, bool)
- func IntersectInt(oldIds, newIds []uint32) (excludedIds, keptIds, addedIds []uint32)
- func IntersectString(oldIds, newIds []string) (excludedIds, keptIds, addedIds []string)
- func IntersectUuid(oldIds, newIds [][]byte) (excludedIds [][]byte, keptIds [][]byte, addedIds [][]byte)
- func Md5Hash(text string) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5Unpadding(origData []byte) []byte
- func ParseTime(timeStr interface{}) (t time.Time)
- func SHA512(text string) string
- func SameDay(a, b interface{}) bool
- func Sha1Encrypt(str string) string
- func StringHashToUint32(s string) uint32
- func Substract(arrs ...interface{}) (reflect.Value, bool)
- func Union(arrs ...interface{}) (reflect.Value, bool)
- func Validate(imei string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESBase64Decrypt ¶
aes decryot decode base64 encoded, encrypted data
func AESBase64Encrypt ¶
aes encryot with PKCS5Padding and return base64 encoded string
func ContainString ¶ added in v1.0.5
func Difference ¶
Difference returns a slice of values that are only present in one of the input slices
[1, 2, 2, 4, 6] & [2, 4, 5] >> [1, 5, 6]
[1, 1, 3, 4, 5, 6] >> [1, 3, 4, 5, 6]
func FieldSlice ¶
export slice from list by field
func FormatTime ¶
func FormatTime(ts interface{}) string
func GenerateSessionId ¶ added in v1.0.5
func Intersect ¶
Intersect returns a slice of values that are present in all of the input slices
[1, 1, 3, 4, 5, 6] & [2, 3, 6] >> [3, 6]
[1, 1, 3, 4, 5, 6] >> [1, 3, 4, 5, 6]
func IntersectInt ¶ added in v1.0.5
This method allows to compute the Intersect of two list.
input:
oldIds : a list of old ids newIds : a list of new ids
return:
excludedIds : the ids which are in old ids but not in new ids keptIds : the ids which are both in old ids and new ids addedIds : the ids which are in new ids but not in old olds
func IntersectString ¶ added in v1.0.5
func IntersectUuid ¶ added in v1.0.5
func IntersectUuid(oldIds, newIds [][]byte) (excludedIds [][]byte, keptIds [][]byte, addedIds [][]byte)
This method allows to compute the Intersect of two list.
input:
oldIds : a list of old ids newIds : a list of new ids
return:
excludedIds : the ids which are in old ids but not in new ids keptIds : the ids which are both in old ids and new ids addedIds : the ids which are in new ids but not in old olds
func PKCS5Padding ¶
func PKCS5Unpadding ¶
func Sha1Encrypt ¶ added in v1.0.5
func StringHashToUint32 ¶ added in v1.0.5
func Substract ¶
Substract returns a slice of values that are only present in one of the input slices
[1, 2, 2, 4, 6] & [2, 4, 5] >> [1, 6]
[1, 1, 3, 4, 5, 6] >> [1, 3, 4, 5, 6]
Types ¶
This section is empty.