Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
GoName string
DBName string
Index []int
Type reflect.Type
Const bool
Required bool
Producers ProducerSet
}
Field describes a leaf structure field (not an embedded substructure). All fields are read-only.
type Meta ¶
type Meta struct{}
Meta is a type for dummy fields bearing tags for the containing structure
type ProducerSet ¶
ProducerSet is a set of allowed Producer values
func ParseProducerSet ¶
func ParseProducerSet(pattern string) ProducerSet
ParseProducerSet parses a string into a ProducerSet. The string is a list of alternatives separated by "|". Other characters are matched exactly.
type Struct ¶
type Struct struct {
DBName string
Type reflect.Type
Fields []Field
// contains filtered or unexported fields
}
Struct describes a structure. All fields are read-only.
func SurveyNew ¶
SurveyNew produces a Struct describing a type, ignoring all sections with upgrade=new
func SurveyOld ¶
SurveyOld produces a Struct describing a type, ignoring all sections with upgrade=old
func (Struct) ValidateRequired ¶
ValidateRequired checks if all required fields of the entity are filled and returns an error if not