Documentation
¶
Index ¶
Constants ¶
View Source
const ( CheckKidUnique = CheckKid("unique") CheckKidRefKey = CheckKid("refKey") CheckKidNotNull = CheckKid("notnull") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Violation []*Violation
}
func (*Error) AppendNotNull ¶
func (*Error) AppendUnique ¶
type Option ¶
type Option func(c *Options)
func WithNotNull ¶
func WithPresence ¶
func WithPresence() Option
type Options ¶
type Options struct {
CheckNotNull bool
CheckUnique bool
CheckRef bool
PresenceProvider *option.PresenceProvider
}
func NewOptions ¶
func NewOptions() *Options
type Validation ¶
type Validation struct {
Type reflect.Type
Unique []*Check
RefKey []*Check
NoNull []*Check
// contains filtered or unexported fields
}
func NewValidation ¶
func NewValidation(p reflect.Type, presence *option.PresenceProvider) (*Validation, error)
Click to show internal directories.
Click to hide internal directories.