Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrExpectedStructPtr = errors.New("Invalid field interface, expected struct pointer")
ErrExpectedStructPtr is produced when a type other than a struct pointer is passed to be populated.
var ErrInvalidKind = errors.New("Invalid field kind, expected string, bool, numeric, secureform.Type, or secureform.File")
ErrInvalidKind is produced when a struct field has an unsupported type. Currently, only string, bool, numeric, secureform.Type and secureform.File types are supported.
var ErrValidMax = errors.New("Result falls above maximum range")
ErrValidMax is produced when a form value or string length is too large.
var ErrValidMin = errors.New("Result falls below minimum range")
ErrValidMin is produced when a form value or string length is too small.
Functions ¶
This section is empty.
Types ¶
type FieldError ¶
FieldError is an error that relates to a specific struct field.
func (*FieldError) Error ¶
func (err *FieldError) Error() string
type File ¶
type File struct {
*multipart.FileHeader
}
File represents a form input element such as <input type="file" />
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser defines the security parameters for form parsing.
func NewParser ¶
NewParser allocates and returns a new Parser with the specified properties.
The memory paramater is the maximum memory used before writing extra to the disk with multipart form data. The bytes parameter is the maximum size request body before sending an error back to the client. The stringLen parameter is the maximum size string allowed in a string form field.