decoder

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package decoder provides configurable HTTP form body decoding that depends on Gorilla's schema package which does not contaminate objects with URL query parameters unlike the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(v any, r *http.Request, readLimit, memoryLimit int64) (err error)

TODO: should this be forked out to oakhttp library? TODO: all the chaching could be ripped out `schema` package as schema can expect only one type of Request struct? TODO: Add QueryValues and PathValues (from URL body) to produce url.Values and feed them to Gorilla scheme Decoder when 1.22 comes out. id := r.PathValue("id")

func ParseMultiPartBody

func ParseMultiPartBody(r io.Reader, boundary string, memoryLimit int64) (url.Values, error)

func ParseURLEncodedBody

func ParseURLEncodedBody(r io.Reader) (url.Values, error)

Types

This section is empty.

Directories

Path Synopsis
Package schema fills a struct with form values.
Package schema fills a struct with form values.

Jump to

Keyboard shortcuts

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