Documentation ¶
Index ¶
- func CheckFileExt(fileHeader *multipart.FileHeader, extListString string) bool
- func CheckFileSize(file multipart.File, maxSizeString string, unit string) bool
- func CompareBcrypt(hash, str string) bool
- func CreateAndSendNotice(noticeTitle string, noticeContent string, noticeType string, ...) (err error)
- func CreateToken(username string) (ss string)
- func EncodeBcrypt(str string) (hs string, err error)
- func EncodeMD5(str string) string
- func EncodeRsa(pk string, label string) (data string, err error)
- func GetConfigBackend(configItem string) (key string)
- func GetConfigFrontend(configItem string) (key string)
- func GetDict(dictCode string) (err error, dict []model.SysDict)
- func GetUsername(c *gin.Context) string
- func GlobalModelToMap(model *global.GqaModel) map[string]interface{}
- func GqaI18n(c *gin.Context, key string) string
- func GqaI18nWithData(c *gin.Context, key string, data string) string
- func HttpPost(url string, data []byte, headers map[string]string) ([]byte, error)
- func MergeMap(mObj ...map[string]interface{}) map[string]interface{}
- func SliceSortCompact[T cmp.Ordered](s []T) []T
- func Struct2Map(obj interface{}) map[string]interface{}
- func UploadFile(createPath string, fileHeader *multipart.FileHeader) (filename string, err error)
- func ZipFiles(filename string, files []string, oldForm, newForm string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileExt ¶
func CheckFileExt(fileHeader *multipart.FileHeader, extListString string) bool
func CheckFileSize ¶
func CompareBcrypt ¶
func CreateAndSendNotice ¶
func CreateToken ¶
func EncodeBcrypt ¶
func GetConfigBackend ¶
func GetConfigFrontend ¶
func GetUsername ¶
func GlobalModelToMap ¶
func SliceSortCompact ¶
SliceSortCompact 切片去重,Go语言1.21 slices包语法
func Struct2Map ¶
func Struct2Map(obj interface{}) map[string]interface{}
func UploadFile ¶
func UploadFile(createPath string, fileHeader *multipart.FileHeader) (filename string, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.