Documentation ¶
Index ¶
Constants ¶
View Source
const ( Maximum = "Maximum" Minimum = "Minimum" ExclusiveMaximum = "ExclusiveMaximum" ExclusiveMinimum = "ExclusiveMinimum" MaxLength = "MaxLength" MinLength = "MinLength" MaxProperties = "MaxProperties" MinProperties = "MinProperties" MaxItems = "MaxItems" MinItems = "MinItems" Pattern = "Pattern" UniqueItems = "UniqueItems" )
Validation Markers.
Variables ¶
This section is empty.
Functions ¶
func DefaultNameSystem ¶
func DefaultNameSystem() string
DefaultNameSystem returns the default name system for ordering the types to be processed by the generators in this package.
func GenerateValidationProperty ¶
func GenerateValidationProperty(vp validationParser) error
func NameSystems ¶
func NameSystems() namer.NameSystems
NameSystems returns the name system used by the generators in this package.
Types ¶
type APIRule ¶
type APIRule interface { // Validate evaluates API rule on type t and returns a list of field names in // the type that violate the rule. Empty field name [""] implies the entire // type violates the rule. Validate(t *types.Type) ([]string, error) // Name returns the name of APIRule Name() string }
APIRule is the interface for validating API rule on Go types
Source Files ¶
Click to show internal directories.
Click to hide internal directories.