Categorygithub.com/go-macaron/binding
modulepackage
1.2.0
Repository: https://github.com/go-macaron/binding.git
Documentation: pkg.go.dev

# README

binding

GitHub Workflow Status codecov GoDoc Sourcegraph

Middleware binding provides request data binding and validation for Macaron.

Installation

go get github.com/go-macaron/binding

Getting Help

Credits

This package is a modified version of martini-contrib/binding.

License

This project is under the Apache License, Version 2.0. See the LICENSE file for the full license text.

# Functions

AddParamRule adds new validation rule.
AddRule adds new validation rule.
Bind wraps up the functionality of the Form and Json middleware according to the Content-Type and verb of the request.
BindIgnErr will do the exactly same thing as Bind but without any error handling, which user has freedom to deal with them.
Form is middleware to deserialize form-urlencoded data from the request.
Json is middleware to deserialize a JSON payload from the request into the struct that is passed in.
MultipartForm works much like Form, except it can parse multipart forms and handle file uploads.
RawValidate is same as Validate but does not require a HTTP context, and can be used independently just for validation.
SetNameMapper sets name mapper.
URL is the middleware to parse URL parameters into struct fields.
Validate is middleware to enforce required fields.
Yaml is middleware to deserialize a YAML payload from the request into the struct that is passed in.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
Type mismatch errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Validation errors.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
CustomErrorHandler will be invoked if errors occured.
No description provided by the author
Maximum amount of memory to use when parsing a multipart form.
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
NameMapper represents a form tag name mapper.
No description provided by the author
No description provided by the author