bindstruct

package
v1.0.0-...-4f7f1ef Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultBindConfig default BindConfig
	DefaultBindConfig = NewBindConfig()
)

Functions

func BindStruct

func BindStruct(obj interface{}) martini.Handler

BindStruct martini handler for bind struct with default config

func BindStructWithConfig

func BindStructWithConfig(obj interface{}, config BindConfig) martini.Handler

BindStructWithConfig martini handler for bind struct

func EnsureBindStruct

func EnsureBindStruct(ctx martini.Context, obj interface{}) reflect.Value

EnsureBindStruct ensure martini context mapped struct

Types

type BindConfig

type BindConfig struct {
	DisableBindQuery   bool
	DisableBindParams  bool
	DisableTrimSpace   bool
	DisableGoValidator bool

	// Maximum amount of memory to use when parsing a multipart form.
	// Set this to whatever value you prefer; default is 20 MB.
	MaxMemory int64
}

BindConfig config for bind

func NewBindConfig

func NewBindConfig() BindConfig

NewBindConfig create default BindConfig

Jump to

Keyboard shortcuts

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