Documentation ¶
Index ¶
- func BoolToString(b bool) string
- func CamelToSnakeCase(camel string) string
- func EnsureFileFolderExists(path string)
- func FileExist(path string) bool
- func FilterQuery(urlString string, blackList []string) string
- func GenerateClientId() string
- func GenerateClientSecret() string
- func GenerateId() string
- func GenerateSimpleTimeId() string
- func GenerateTimeId() string
- func GetCurrentTime() string
- func GetCurrentUnixTime() string
- func GetHmacSha1(keyStr, value string) string
- func GetIPFromRequest(req *http.Request) string
- func GetIPInfo(clientIP string) string
- func GetId(name string) string
- func GetMaskedEmail(email string) string
- func GetMaskedPhone(phone string) string
- func GetMaxLenStr(strs ...string) string
- func GetMd5Hash(text string) string
- func GetMinLenStr(strs ...string) string
- func GetOwnerAndNameFromId(id string) (string, string)
- func GetOwnerAndNameFromIdNoCheck(id string) (string, string)
- func GetPath(path string) string
- func GetUploadXlsxPath(fileId string) string
- func GetUrlHost(urlString string) string
- func GetUrlPath(urlString string) string
- func IsChinese(str string) bool
- func IsEmailValid(email string) bool
- func IsPhoneCnValid(phone string) bool
- func IsStrsEmpty(strs ...string) bool
- func IsTokenExpired(createdTime string, expiresIn int) bool
- func JsonToStruct(data string, v interface{}) error
- func LogInfo(ctx *context.Context, f string, v ...interface{})
- func LogWarning(ctx *context.Context, f string, v ...interface{})
- func ParseBool(s string) bool
- func ParseFloat(s string) float64
- func ParseInt(s string) int
- func ReadStringFromPath(path string) string
- func RemoveExt(filename string) string
- func SafeGoroutine(fn func())
- func SnakeString(s string) string
- func StructToJson(v interface{}) string
- func StructToJsonFormatted(v interface{}) string
- func UrlJoin(base string, path string) string
- func WriteStringToPath(s string, path string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToString ¶
func CamelToSnakeCase ¶
CamelToSnakeCase This function transform camelcase in snakecase LoremIpsum in lorem_ipsum
func EnsureFileFolderExists ¶
func EnsureFileFolderExists(path string)
func FilterQuery ¶
func GenerateClientId ¶
func GenerateClientId() string
func GenerateClientSecret ¶
func GenerateClientSecret() string
func GenerateId ¶
func GenerateId() string
func GenerateSimpleTimeId ¶ added in v1.29.0
func GenerateSimpleTimeId() string
func GenerateTimeId ¶ added in v1.27.6
func GenerateTimeId() string
func GetCurrentTime ¶
func GetCurrentTime() string
func GetCurrentUnixTime ¶
func GetCurrentUnixTime() string
func GetHmacSha1 ¶ added in v1.62.0
func GetIPFromRequest ¶
func GetMaskedEmail ¶ added in v1.29.1
func GetMaskedPhone ¶ added in v1.29.1
func GetMaxLenStr ¶
func GetMd5Hash ¶
func GetMinLenStr ¶
func GetOwnerAndNameFromId ¶
func GetUploadXlsxPath ¶
func GetUrlHost ¶
func GetUrlPath ¶
func IsEmailValid ¶
func IsPhoneCnValid ¶
func IsStrsEmpty ¶
func IsTokenExpired ¶ added in v1.15.0
func JsonToStruct ¶
func LogWarning ¶
func ParseFloat ¶ added in v1.27.6
func ReadStringFromPath ¶
func SafeGoroutine ¶ added in v1.44.3
func SafeGoroutine(fn func())
func StructToJson ¶
func StructToJson(v interface{}) string
func StructToJsonFormatted ¶
func StructToJsonFormatted(v interface{}) string
func WriteStringToPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.