field_validation

package
v0.0.0-...-d5453b7 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForType

func ForType(r Rule) string

func SetType

func SetType(r Rule)

func ValidationType

func ValidationType(r Rule) string

Types

type DateEnum

type DateEnum struct {
	Type    string   `json:"type"`
	Options []string `json:"options"`
}

type FloatBetween

type FloatBetween struct {
	Type string  `json:"type"`
	From float64 `json:"from"`
	To   float64 `json:"to"`
}

type FloatEnum

type FloatEnum struct {
	Type    string    `json:"type"`
	Options []float64 `json:"options"`
}

type IntegerBetween

type IntegerBetween struct {
	Type string `json:"type"`
	From int    `json:"from"`
	To   int    `json:"to"`
}

type IntegerEnum

type IntegerEnum struct {
	Type    string `json:"type"`
	Options []int  `json:"options"`
}

type RelationshipOneToMany

type RelationshipOneToMany struct {
	Type string `json:"type"`
	To   string `json:"to"`
}

type RelationshipOneToOne

type RelationshipOneToOne struct {
	Type string `json:"type"`
	To   string `json:"to"`
}

type Rule

type Rule interface {
	// contains filtered or unexported methods
}

func TypeFor

func TypeFor(fieldType, validationType string) Rule

type StringEnum

type StringEnum struct {
	Type    string   `json:"type"`
	Options []string `json:"options"`
}

type StringPlain

type StringPlain struct {
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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