Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraints ¶
type Constraints uint32
const ( // Attribute can't be left out (but can be null, empty, etc.) Required Constraints = (1 << iota) // Attribute can't be null NonNull // Attribute can't be an empty collections or an empty string NonEmpty // If an attribute is a string - preprocess it with strings.TrimSpace TrimSpace // Attribute must be a whole integer number Integer )
const ( // Attribute will be trimmed and later checked to be non-empty // If attribute is not a string - trim operation does nothing TrimmedNonEmpty Constraints = NonEmpty | TrimSpace // Attribute is not required, but (if specified) must be non-null, non-empty, strings are trimmed Meaningful Constraints = NonNull | TrimmedNonEmpty // Attribute is required, non-null, non-empty, strings are trimmed RequiredMeaningful Constraints = Required | Meaningful // Attribute is required and non-null RequiredNonNull Constraints = Required | NonNull )
func (Constraints) Is ¶
func (c Constraints) Is(test Constraints) bool
Click to show internal directories.
Click to hide internal directories.