param

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseParams

func ParseParams(r *http.Request) (map[string]interface{}, error)

ParseParams extracts parameters from a request that an application can consume.

Depending on the type of request, parameters may be extracted from either the query string, a form-encoded body, or a multipart form-encoded body (the latter being specific to only a very small number of endpoints).

Regardless of origin, parameters are assumed to follow "Rack-style" conventions for encoding complex types like arrays and maps, which is how the Stripe API decodes data. These complex types are what makes the param package's implementation non-trivial. We rely on the nestedtypeassembler subpackage to do the heavy lifting for that.

Types

This section is empty.

Directories

Path Synopsis
Package form is a small package used to hold a few types common to the param package so that we don't have import cycles.
Package form is a small package used to hold a few types common to the param package so that we don't have import cycles.
Package nestedtypeassembler takes a collection of form.Pair tuples and uses them to construct more complex data types using "Rack-style" conventions for arrays and maps with a few small Stripe-specific tweaks.
Package nestedtypeassembler takes a collection of form.Pair tuples and uses them to construct more complex data types using "Rack-style" conventions for arrays and maps with a few small Stripe-specific tweaks.

Jump to

Keyboard shortcuts

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