validator

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImageTypeJpeg is type of Jpeg.
	ImageTypeJpeg = "jpeg"
	// ImageTypeGif is type of Gif.
	ImageTypeGif = "gif"
	// ImageTypePng is type of PNG.
	ImageTypePng = "png"
	// ImageTypeBmp is type of BMP.
	ImageTypeBmp = "bmp"
	// ImageTypeTiff is type of TIFF.
	ImageTypeTiff = "tiff"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageValidator

type ImageValidator struct {
	// contains filtered or unexported fields
}

ImageValidator struct.

func NewImageValidator

func NewImageValidator(imagetype []string, maxwidth, maxheight, maxfilesize int) *ImageValidator

NewImageValidator creates a new ImageValidator.

func (*ImageValidator) Validate

func (val *ImageValidator) Validate(ctx context.Context, uploadfile io.Reader) error

Validate process to validate uploadfile.

Jump to

Keyboard shortcuts

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