form

package
v0.4.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsResizable added in v0.4.6

func IsResizable(c *gin.Context, header *multipart.FileHeader) bool

func ParseError

func ParseError(request FormRequest, err error) string

func ParseErrors

func ParseErrors(request FormRequest, err error) map[string][]string

func Save added in v0.4.8

func Save(c *gin.Context, file *multipart.FileHeader) (dir string, filename string, err error)

func SaveAndCompress added in v0.4.7

func SaveAndCompress(c *gin.Context, file *multipart.FileHeader, compressedRatio float64, removeOldFile bool) (string, error)

func SaveUploadedFile

func SaveUploadedFile(c *gin.Context, file *multipart.FileHeader) (string, error)

func Validate added in v0.4.2

func Validate(c *gin.Context, request FormRequest) bool

Types

type FormRequest

type FormRequest interface {
	Messages() ValidatorMessages
}

type ValidatorMessages

type ValidatorMessages map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL