Documentation
¶
Index ¶
- Constants
- Variables
- func CalcTimeRange(fromDate string, toDate string) int64
- func CheckDirectoryExists(dir string) bool
- func CheckHash(hash string, secret string) error
- func ConvertInterfaceToIntMap(i []interface{}) []int
- func ConvertToBool(any interface{}) bool
- func ConvertToFloat64(any interface{}) float64
- func ConvertToInt(any interface{}) int
- func ConvertToInt64(any interface{}) int64
- func ConvertToString(any interface{}) string
- func ConvertToUint(any interface{}) uint
- func CreateHash(secret string) string
- func CreateMD5(secret interface{}) string
- func CreateSHA1(secret interface{}) string
- func CreateUuid() string
- func GetBytes(key interface{}) ([]byte, error)
- func GetFileContentType(extension string) string
- func GetFileExtensionByContentType(contentType string) string
- func GetGinRequest(c *gin.Context)
- func GetJSON(value interface{})
- func GetOS() string
- func GetPathSeparator() string
- func GetPostJSON(ctx *gin.Context)
- func GetStructName(s interface{}) string
- func GetType(value interface{})
- func IsRunnigTest() bool
- func IsValidUUID(u string) bool
- func MergeStringInterfaceMap(map1 map[string]interface{}, map2 map[string]interface{}) map[string]interface{}
- func Pluck(any interface{}, key string) interface{}
- func SliceToSet(any interface{}) interface{}
- func ValidJSONWebToken(requestToken string) bool
- type Token
Constants ¶
View Source
const Iso8601 = "2006-01-02"
View Source
const Rfc2822 = "Mon Jan 02 15:04:05 -0700 2006"
View Source
const Yyyymmddhhmmss = "2006/01/02 15:04:05"
Variables ¶
View Source
var (
RootPath = filepath.Join(filepath.Dir(b), "../..")
)
Functions ¶
func CalcTimeRange ¶
func CheckDirectoryExists ¶
func ConvertInterfaceToIntMap ¶
func ConvertInterfaceToIntMap(i []interface{}) []int
func ConvertToBool ¶
func ConvertToBool(any interface{}) bool
func ConvertToFloat64 ¶
func ConvertToFloat64(any interface{}) float64
func ConvertToInt ¶
func ConvertToInt(any interface{}) int
func ConvertToInt64 ¶
func ConvertToInt64(any interface{}) int64
func ConvertToString ¶
func ConvertToString(any interface{}) string
func ConvertToUint ¶
func ConvertToUint(any interface{}) uint
func CreateHash ¶
func CreateSHA1 ¶
func CreateSHA1(secret interface{}) string
func CreateUuid ¶
func CreateUuid() string
func GetFileContentType ¶
func GetGinRequest ¶
func GetPathSeparator ¶
func GetPathSeparator() string
func GetPostJSON ¶
func GetStructName ¶
func GetStructName(s interface{}) string
func IsRunnigTest ¶
func IsRunnigTest() bool
func IsValidUUID ¶
func MergeStringInterfaceMap ¶
func SliceToSet ¶
func SliceToSet(any interface{}) interface{}
func ValidJSONWebToken ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.