Documentation ¶
Index ¶
- func CreateData(values form.Values, fields ...string) (dialect.H, error)
- func GeneratePaths(fpp *FilePathParam, fileName, levelsStr, idStr string) (string, string, error)
- func MoveUploadFile(mfp *MoveFuncParam, values form.Values, levelsStr, idStr string) (string, error)
- func ParamsValidator(values form.Values, pvr []ParamsValidateRule) error
- type FilePathParam
- type MoveFuncParam
- type ParamsValidateRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateData ¶
创建 insert 或者 update 需要的 data
func GeneratePaths ¶
func GeneratePaths(fpp *FilePathParam, fileName, levelsStr, idStr string) (string, string, error)
生成文件地址和对应的 url
func MoveUploadFile ¶
func MoveUploadFile(mfp *MoveFuncParam, values form.Values, levelsStr, idStr string) (string, error)
move upload file
func ParamsValidator ¶
func ParamsValidator(values form.Values, pvr []ParamsValidateRule) error
参数验证,不满足规则要求时,就跳过
Types ¶
type FilePathParam ¶
type MoveFuncParam ¶
type MoveFuncParam struct { FieldName string // 表单中上传文件字段名称 UploadsPath string // goadmin默认上传目录 FPP *FilePathParam }
Click to show internal directories.
Click to hide internal directories.