validation

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts Options) files.Middleware

Types

type Error

type Error struct {
	Reason  Reason
	Message string
}

func (*Error) Error

func (e *Error) Error() string

type Options

type Options struct {
	MaxSize      *int64
	MinSize      *int64
	AllowedTypes []string
	KeyPattern   *regexp.Regexp
	KeyFunc      func(string) bool
}

type Reason

type Reason string
const (
	ReasonKey  Reason = "key"
	ReasonSize Reason = "size"
	ReasonType Reason = "type"
)

Jump to

Keyboard shortcuts

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