Documentation ¶
Index ¶
- Constants
- func Base64ToImage(imageBase64 string) ([]byte, error)
- func Black(msg string) string
- func Blue(msg string) string
- func CaseToCamel(name string) string
- func CheckExist(src string) bool
- func CheckPermission(src string) bool
- func CompareHashAndPassword(e string, p string) (bool, error)
- func CreateFile(content bytes.Buffer, name string)
- func CreatePath(dir string) error
- func CryptoSalt(encode string, salt string) (verify string, err error)
- func Cyan(msg string) string
- func FileMonitoringByID(ctx context.Context, filePth string, id string, group string, ...)
- func GenerateMsgIDFromContext(c *gin.Context) string
- func GetCurrentPath() string
- func GetCurrentTime() time.Time
- func GetCurrentTimeStamp() int64
- func GetCurrentTimeStr() string
- func GetDirFiles(dir string) ([]string, error)
- func GetExt(fileName string) string
- func GetFileSize(filename string) int64
- func GetLocaHost() string
- func GetLocation(ip string) string
- func GetSize(f multipart.File) (int, error)
- func GetUUID() string
- func Green(msg string) string
- func Hmac(data string) string
- func IdsStrToIdsIntGroup(key string, c *gin.Context) []int
- func IdsStrToIdsIntGroupStr(keys string) []int
- func Int64ToString(e int64) string
- func IntToString(e int) string
- func IsNotExistMkDir(src string) error
- func IsStringEmpty(str string) bool
- func Lowerfirst(str string) string
- func Magenta(msg string) string
- func MkDir(src string) error
- func Open(name string, flag int, perm os.FileMode) (*os.File, error)
- func PathExists(path string) bool
- func Red(msg string) string
- func RemoveRepByMap(slc []string) []string
- func Round(f float64, n int) float64
- func SetColor(msg string, conf, bg, text int) string
- func SoltAESDec(data string) string
- func SoltAESEnc(data string) string
- func StringToInt(e string) (int, error)
- func StructToJSONStr(v interface{}) (string, error)
- func Upperfirst(str string) string
- func White(msg string) string
- func Yellow(msg string) string
- type Ids
- type ReplaceHelper
Constants ¶
View Source
const SOLTFORMAT = "%s_%s_%s" // SOLT_DATA_SOLT
SOLTFORMAT 加盐格式
Variables ¶
This section is empty.
Functions ¶
func Base64ToImage ¶
Base64ToImage Base64ToImage
func CryptoSalt ¶
CryptoSalt 根据明文和加盐值生成加密串
func FileMonitoringByID ¶
func FileMonitoringByID(ctx context.Context, filePth string, id string, group string, hookfn func(context.Context, string, string, []byte))
FileMonitoringByID 文件监控
func GenerateMsgIDFromContext ¶
GenerateMsgIDFromContext 生成msgID
func IdsStrToIdsIntGroup ¶
IdsStrToIdsIntGroup 获取URL中批量id并解析
func IdsStrToIdsIntGroupStr ¶
IdsStrToIdsIntGroupStr 字符串转int数组
func StructToJSONStr ¶
StructToJSONStr Struct转json字符串
Types ¶
type ReplaceHelper ¶
ReplaceHelper 字符串替换
Source Files ¶
Click to show internal directories.
Click to hide internal directories.