Documentation ¶
Index ¶
- func CheckFileIsImage(suffix string) string
- func CheckFileSizeIsRight(fileSize float64) bool
- func CheckFileSuffixIsRight(file *multipart.FileHeader) (suffix string, err error)
- func GenerateRandomCode(len int8) string
- func GenerationFilePath(fileName string) string
- func GetUserRealIP(c *gin.Context) string
- func GetValidMsg(err error, obj any) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileSizeIsRight ¶
CheckFileSizeIsRight 检验上传文件大小是否符合配置
func CheckFileSuffixIsRight ¶
func CheckFileSuffixIsRight(file *multipart.FileHeader) (suffix string, err error)
CheckFileSuffixIsRight 校验文件后缀是否符合配置
func GenerationFilePath ¶
func GetValidMsg ¶
GetValidMsg 返回结构体中的msg参数 (使用gin校验器时 取出tag中定义的msg)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.