bindings

package
v3.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

File bindings/form.go source code from https://github.com/monoculum/formame.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoForm returns an error with message: 'Request has no any valid form'
	ErrNoForm = errors.New("Request has no any valid form")
	// ErrWriteJSON returns an error with message: 'Before JSON be written to the body, JSON Encoder returned an error. Trace: +specific error'
	ErrWriteJSON = errors.New("Before JSON be written to the body, JSON Encoder returned an error. Trace: %s")
	// ErrRenderMarshalled returns an error with message: 'Before +type Rendering, MarshalIndent retured an error. Trace: +specific error'
	ErrRenderMarshalled = errors.New("Before +type Rendering, MarshalIndent returned an error. Trace: %s")
	// ErrReadBody returns an error with message: 'While trying to read +type from the request body. Trace +specific error'
	ErrReadBody = errors.New("While trying to read %s from the request body. Trace %s")
)

Functions

func BindForm

func BindForm(ctx context.IContext, formObject interface{}) error

BindForm binds the formObject with the form data it supports any kind of struct

func BindJSON

func BindJSON(ctx context.IContext, jsonObject interface{}) error

BindJSON reads JSON from request's body

func BindXML

func BindXML(ctx context.IContext, xmlObject interface{}) error

BindXML reads XML from request's body

func Decode

func Decode(vs url.Values, dst interface{}) error

Decode decodes the url.Values into a element that must be a pointer to a type provided by argument

Types

This section is empty.

Jump to

Keyboard shortcuts

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