form

package
v0.0.0-...-17c3845 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignForm

func AssignForm(form interface{}, data map[string]interface{})

AssignForm assign form values back to the template data.

func GetInclude

func GetInclude(field reflect.StructField) string

func GetMaxSize

func GetMaxSize(field reflect.StructField) string

func GetMinSize

func GetMinSize(field reflect.StructField) string

func GetSize

func GetSize(field reflect.StructField) string

func Validate

func Validate(errs binding.Errors, data map[string]interface{}, f Form) binding.Errors

Types

type Form

type Form interface {
	binding.Validator
}

type NewBuilder

type NewBuilder struct {
	Name       string `binding:"Required"`
	TrustLevel int
}

func (*NewBuilder) Validate

func (f *NewBuilder) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

type NewTask

type NewTask struct {
	OS     string `form:"os" binding:"Required"`
	Arch   string `binding:"Required"`
	Tags   []string
	Branch string `binding:"Required"`
}

func (*NewTask) Validate

func (f *NewTask) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

Jump to

Keyboard shortcuts

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