Versions in this module Expand all Collapse all v0 v0.0.1 Jan 17, 2024 Changes in this version + const PageSize + const ResultCodeAuth + const ResultCodeError + const ResultCodeSuccess + const ResultCodeSystemError + var Validate *validator.Validate + var ValidateTrans ut.Translator + func AesDecrypt(text string, key []byte) (string, error) + func AesEncrypt(text string, key []byte) (string, error) + func Base64StdDecode(s string) string + func Base64StdEncode(s string) string + func Bind(source interface{}, target interface{}) error + func BitsToSubNetMask(maskBits int) (string, error) + func Byte2Map(b []byte) (map[string]interface{}, error) + func CalculateNetwork(ipAddr, subnetMask string) (string, error) + func ContainsInt64(is []int64, i int64) bool + func CurrentDate() string + func CurrentDateByPlace(place string) string + func CurrentTime() string + func CurrentTimeAppointDay(t time.Time) string + func CurrentTimeDay() string + func DecryptByAes(data string, key []byte) (string, error) + func DesDecrypt(text string, key []byte) (string, error) + func DesDecryptCBC(text string, key []byte) (string, error) + func DesEncrypt(text string, key []byte) (string, error) + func DesEncryptCBC(text string, key []byte) (string, error) + func DetectTcpPort(ip string, port int, timeout time.Duration) bool + func EachMapSort(eachMap interface{}, eachFunc interface{}) error + func EncryptByAes(data string, key []byte) (string, error) + func FormatDate(t time.Time) string + func FormatMonth(t time.Time) string + func FormatMonthChinese(t time.Time) string + func FormatTime(t time.Time) string + func GetInterfaceFiledValue(v interface{}, fieldName string) reflect.Value + func GetLinesFromBuffer(buf *bytes.Buffer) []string + func GetPageIndex(pageIndex int) int + func GetPageNumber(count int64, pageSize int) int + func GetPageSize(pageSize int) int + func GetRemoteAddr(rc *app.RequestContext) string + func GetSelfIps() map[string]map[string]string + func GetSelfPath() string + func GetSelfPathFull() string + func GetSelfV4IFaceFirst() string + func GetSelfV4IpFirst(iFace ...string) string + func GetSelfV4Ips() map[string]string + func GetSelfV6IFaceFirst() string + func GetSelfV6IpFirst(iFace ...string) string + func GetSelfV6Ips() map[string]string + func HmacMd5(str, key string) string + func HmacMd5WithBase64(data, key string) string + func HmacSha1(str, key string) string + func HmacSha1WithBase64(str, key string) string + func HmacSha256(str, key string) string + func HmacSha256WithBase64(str, key string) string + func HmacSha512(str, key string) string + func HmacSha512WithBase64(str, key string) string + func ID() int64 + func IDString() string + func IntConvertToIpAddress(ipInt int) (string, error) + func InterfaceToStruct(out interface{}, in interface{}) error + func IpAddressConvertToInt(ip string) (int, error) + func IsUuid(obj interface{}) bool + func IsValidIP(ipAddr string) bool + func IsValidPort(port string) (int, error) + func IsValidURL(u string) bool + func MakeInstanceFromSlice(v interface{}) (i interface{}, err error) + func MapStringValues(m map[string]string) (v []string) + func MatchString(src, pattern string) bool + func Md5Byte(data []byte) string + func Md5ByteWithBase64(data []byte) string + func Md5File(filename string) (string, error) + func Md5String(s string) string + func Md5StringWithBase64(s string) string + func MustBool(value interface{}) bool + func MustBoolArray(value interface{}) (resArray []bool) + func MustExplodeStructField(array interface{}, field string) (explodeArray []interface{}) + func MustFloat32(value interface{}) (res float32) + func MustFloat32Array(value interface{}) (resArray []float32) + func MustFloat64(value interface{}) (res float64) + func MustFloat64Array(value interface{}) (resArray []float64) + func MustInt(value interface{}) (res int) + func MustInt16(value interface{}) (res int16) + func MustInt16Array(value interface{}) (resArray []int16) + func MustInt32(value interface{}) (res int32) + func MustInt32Array(value interface{}) (resArray []int32) + func MustInt64(value interface{}) (res int64) + func MustInt64Array(value interface{}) (resArray []int64) + func MustInt8(value interface{}) (res int8) + func MustInt8Array(value interface{}) (resArray []int8) + func MustIntArray(value interface{}) (resArray []int) + func MustInterfaceArray(array interface{}) []interface + func MustJson(i interface{}) []byte + func MustJsonPrettyString(i interface{}) string + func MustJsonString(i interface{}) string + func MustMapStringInterfaceRecursions(leafMap interface{}) map[string]interface + func MustMapStringInterfaceRecursionsInArrayInterface(leafAry interface{}) []interface + func MustString(value interface{}) string + func MustStringArray(array interface{}) (resArray []string) + func MustUint(value interface{}) (res uint) + func MustUint16(value interface{}) (res uint16) + func MustUint16Array(value interface{}) (resArray []uint16) + func MustUint32(value interface{}) (res uint32) + func MustUint32Array(value interface{}) (resArray []uint32) + func MustUint64(value interface{}) (res uint64) + func MustUint64Array(value interface{}) (resArray []uint64) + func MustUint8(value interface{}) (res uint8) + func MustUint8Array(value interface{}) (resArray []uint8) + func MustUintArray(value interface{}) (resArray []uint) + func NowTimeMillisecond() string + func NowTimeSecond() string + func Obj2ListMap(obj interface{}) ([]map[string]interface{}, error) + func Obj2ListMapString(obj interface{}) ([]map[string]string, error) + func Obj2Map(obj interface{}) (map[string]interface{}, error) + func Obj2MapString(obj interface{}) (map[string]string, error) + func ParseDate(date string) (time.Time, error) + func ParseTime(date string) (time.Time, error) + func Ping(ipAddr string, timeout time.Duration) bool + func PortCheck(host string, port int) bool + func ReTry(callback func() bool, times int, step time.Duration) + func RemoveFirstString(slice []string) []string + func RemoveItemsContainingSubstring(arr []string, substr string) []string + func RemoveItemsNotContainingSubstring(arr []string, substr string) []string + func RemoveMatchString(slice []string, pattern string, method int) []string + func RemoveMultiSpaces(str string) string + func RemoveTextWithinMatch(str string, pattern string, method int) string + func RemoveTextWithinParens(str string) string + func Result(rc *app.RequestContext, errno int, errmsg string, data interface{}) + func ResultAuthError(rc *app.RequestContext) + func ResultError(rc *app.RequestContext, errMsg string) + func ResultErrorData(rc *app.RequestContext, errMsg string, data interface{}) + func ResultSuccess(rc *app.RequestContext, msg string, data interface{}) + func ResultSuccessData(rc *app.RequestContext, data interface{}) + func ResultSuccessMsg(rc *app.RequestContext, msg string) + func ResultSystemError(rc *app.RequestContext, errMsg string) + func RunningOs(osName ...string) string + func Sha1(str string) string + func Sha1WithBase64(str string) string + func Sha256(str string) string + func Sha256WithBase64(str string) string + func Sha512(str string) string + func Sha512WithBase64(str string) string + func String2Map(str string) (map[string]interface{}, error) + func String2MapList(str string) ([]map[string]interface{}, error) + func StringEndWith(str, suffix string) bool + func StringEndWithIgnoreCase(str, suffix string) bool + func StringIsEmpty(str string) bool + func StringIsInt(str string) (int, bool) + func StringIsInt64(str string) (int64, bool) + func StringStartWith(str, prefix string) bool + func StringStartWithIgnoreCase(str, prefix string) bool + func SubNetMaskToBits(subnetMask string) (int, error) + func ToArrayMapStr(m []map[string]interface{}) (string, error) + func ToArrayMapString(maps []map[string]interface{}) []map[string]string + func ToBool(value interface{}) (res bool, err error) + func ToBoolArray(value interface{}) (resArray []bool, err error) + func ToExplodeStructField(array interface{}, field string) (explodeArray []interface{}, err error) + func ToFload64(value string) (float64, error) + func ToFloat32(value interface{}) (res float32, err error) + func ToFloat32Array(value interface{}) (resArray []float32, err error) + func ToFloat64(value interface{}) (res float64, err error) + func ToFloat64Array(value interface{}) (resArray []float64, err error) + func ToInt(value interface{}) (res int, err error) + func ToInt16(value interface{}) (res int16, err error) + func ToInt16Array(value interface{}) (resArray []int16, err error) + func ToInt32(value interface{}) (res int32, err error) + func ToInt32Array(value interface{}) (resArray []int32, err error) + func ToInt64(value interface{}) (res int64, err error) + func ToInt64Array(value interface{}) (resArray []int64, err error) + func ToInt8(value interface{}) (res int8, err error) + func ToInt8Array(value interface{}) (resArray []int8, err error) + func ToIntArray(value interface{}) (resArray []int, err error) + func ToInterfaceArray(array interface{}) ([]interface{}, error) + func ToInterfaceByte(m interface{}) []byte + func ToMapByte(m map[string]interface{}) []byte + func ToMapStr(m map[string]interface{}) (string, error) + func ToMapString(m map[string]interface{}) map[string]string + func ToObjStr(o interface{}) string + func ToString(value interface{}) string + func ToStringArray(value interface{}) ([]string, error) + func ToStringArrayInt64(value, sep string) (arr []int64) + func ToUint(value interface{}) (res uint, err error) + func ToUint16(value interface{}) (res uint16, err error) + func ToUint16Array(value interface{}) (resArray []uint16, err error) + func ToUint32(value interface{}) (res uint32, err error) + func ToUint32Array(value interface{}) (resArray []uint32, err error) + func ToUint64(value interface{}) (res uint64, err error) + func ToUint64Array(value interface{}) (resArray []uint64, err error) + func ToUint8(value interface{}) (res uint8, err error) + func ToUint8Array(value interface{}) (resArray []uint8, err error) + func ToUintArray(value interface{}) (resArray []uint, err error) + func TransTo62(id int64) string + func TrimLeadingCharacter(str, character string) string + func TrimLeadingCharacterIgnoreCase(str, character string) string + func TrimTrailingCharacter(str, character string) string + func TrimTrailingCharacterIgnoreCase(str, character string) string + func UuidGenerate() string + func ValidateStruct(s interface{}) error + func XOR(plain string, key []byte) string + type Count struct + Count int64 + type JsonTime time.Time + func (this JsonTime) MarshalJSON() ([]byte, error) + type PageData struct + Count int64 + Data interface{} + PageIndex int + PageNumber int + PageSize int + type PageParam struct + PageIndex int + PageSize int + type PageTable struct + Fields string + GroupBy string + Order string + PageIndex int + PageSize int + Table string + Where string + type PhoneData struct + Brand string + BrandTitle string + Code string + CodeAlias string + Dtype string + Model string + ModelName string + VerName string + type RandID struct + func NewRandID() *RandID + func (id *RandID) NextId() int64 + type UserAgentRes struct + OSName string + OSVersion string + PhoneBrand string + PhoneModel string + func GetUserAgent(userAgent string) UserAgentRes