Discover Packages
github.com/colonyops/hive
internal
web
extractors
package
Version:
v0.67.0
Opens a new window with list of versions in this module.
Published: Oct 28, 2026
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package extractors decodes and validates request input: Body decodes into a
typed struct and runs its Validate method when it has one.
Body decodes a JSON request body into T, capped at 1 MiB with unknown
fields rejected, then validates it. A body over the cap returns the
*http.MaxBytesError itself, which mid.Errors renders as 413.
Files leaves at most 1 MiB in memory; callers remove the form's temporary
files after closing the readers. Authentication must precede extraction.
type Validator interface {
Validate() error
}
Validator is the optional contract a request struct implements to be
validated after decoding.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.