Documentation ¶
Index ¶
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func CleanUpfuncName(funcName string) string
- func CopyFile(srcName string, dstName string) (written int64, err error)
- func DifferenceSubset(mainSlice, subSlice []int64) []int64
- func DifferenceSubsetString(mainSlice, subSlice []string) []string
- func FileExist(filename string) bool
- func FileTmpPath(fullPath, dbPrefix string) string
- func FirstLower(s string) string
- func GetConversationIDByGroupID(groupID string) string
- func GetConversationIDByMsg(msg *sdk_struct.MsgStruct) string
- func GetConversationTableName(conversationID string) string
- func GetCurrentTimestampByMill() int64
- func GetCurrentTimestampByNano() int64
- func GetCurrentTimestampBySecond() int64
- func GetErrTableName(conversationID string) string
- func GetGroupIDForMinSeq(groupID string) string
- func GetMsgID(sendID string) string
- func GetSelfFuncName() string
- func GetSwitchFromOptions(Options map[string]bool, key string) (result bool)
- func GetTableName(conversationID string) string
- func GetUserIDForMinSeq(userID string) string
- func Int32ToString(i int32) string
- func Int64ToString(i int64) string
- func IntToString(i int) string
- func Intersect(slice1, slice2 []int64) []int64
- func IsContain(target string, List []string) bool
- func IsContainInt(target int, List []int) bool
- func IsContainUInt32(target uint32, List []uint32) bool
- func JsonDataOne(pb proto.Message) map[string]interface{}
- func JsonStringToStruct(s string, args interface{}) error
- func KMP(rMainString string, rSubString string) (isInMainString bool)
- func LogBegin(v ...interface{})
- func LogEnd(v ...interface{})
- func LogFReturn(v ...interface{})
- func LogSReturn(v ...interface{})
- func LogStart(v ...interface{})
- func Md5(s string) string
- func OperationIDGenerator() string
- func PKCS5Padding(plaintext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{}
- func RemoveOneInList[T comparable](slice []T, val T) []T
- func RemoveRepeatedElementsInList[T Comparable](slc []T) []T
- func RunFuncName() string
- func SetSwitchFromOptions(Options map[string]bool, key string, value bool)
- func StringToInt(i string) int
- func StringToInt64(i string) int64
- func StructToJsonString(param interface{}) string
- func StructToJsonStringDefault(param interface{}) string
- func StructToMap(user interface{}) map[string]interface{}
- func TimeStringToTime(timeString string) (time.Time, error)
- func TimeToString(t time.Time) string
- func TrimStringList(list []string) (result []string)
- func Uint32ListConvert(list []uint32) []int64
- func UnixNanoSecondToTime(nanoSecond int64) time.Time
- func UnixSecondToTime(second int64) time.Time
- func UnmarshalNotificationElem(bytes []byte, t interface{}) error
- func Unwrap(err error) error
- func WithMessage(err error, message string) error
- func Wrap(err error, message string) error
- type Comparable
- type LogInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func CleanUpfuncName ¶
func DifferenceSubset ¶
Get the diff of two slices
func DifferenceSubsetString ¶
func FileTmpPath ¶
func FirstLower ¶
func GetConversationIDByMsg ¶
func GetConversationIDByMsg(msg *sdk_struct.MsgStruct) string
funcation GetConversationIDBySessionType(sourceID string, sessionType int) string { switch sessionType { case constant.SingleChatType: return "single_" + sourceID case constant.GroupChatType: return "group_" + sourceID case constant.SuperGroupChatType: return "super_group_" + sourceID case constant.NotificationChatType: return "notification_" + sourceID } return "" }
func GetCurrentTimestampByMill ¶
func GetCurrentTimestampByMill() int64
Get the current timestamp by Mill
func GetCurrentTimestampByNano ¶
func GetCurrentTimestampByNano() int64
Get the current timestamp by Nano
func GetCurrentTimestampBySecond ¶
func GetCurrentTimestampBySecond() int64
func GetErrTableName ¶
func GetGroupIDForMinSeq ¶
func GetSelfFuncName ¶
func GetSelfFuncName() string
func GetSwitchFromOptions ¶
func GetTableName ¶
func GetUserIDForMinSeq ¶
func Int32ToString ¶
func Int64ToString ¶
func IntToString ¶
func IsContainInt ¶
func IsContainUInt32 ¶
func JsonDataOne ¶
func JsonStringToStruct ¶
The incoming parameter must be a pointer
func LogFReturn ¶
func LogFReturn(v ...interface{})
func LogSReturn ¶
func LogSReturn(v ...interface{})
func OperationIDGenerator ¶
func OperationIDGenerator() string
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func RemoveOneInList ¶
func RemoveOneInList[T comparable](slice []T, val T) []T
func RemoveRepeatedElementsInList ¶
func RemoveRepeatedElementsInList[T Comparable](slc []T) []T
func RunFuncName ¶
func RunFuncName() string
func SetSwitchFromOptions ¶
func StringToInt ¶
func StringToInt64 ¶
func StructToJsonString ¶
func StructToJsonString(param interface{}) string
func StructToJsonStringDefault ¶
func StructToJsonStringDefault(param interface{}) string
func StructToMap ¶
func StructToMap(user interface{}) map[string]interface{}
func TimeToString ¶
func TrimStringList ¶
func Uint32ListConvert ¶
func UnixNanoSecondToTime ¶
Convert nano timestamp to time.Time type
func UnixSecondToTime ¶
func WithMessage ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.