Documentation ¶
Index ¶
- Constants
- Variables
- func Parse(srcFileName string, rc *ds.RecordPackage) error
- func ParseFieldType(dst *ds.RecordPackage, name, pName string, t interface{}) (string, error)
- func ParseFields(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParseFieldsObject(dst *ds.RecordPackage, fieldsobject []*ast.Field) error
- func ParseFieldsTag(field *ast.Field, newfield *ds.FieldDeclaration, newindex *ds.IndexDeclaration) error
- func ParseFlags(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParseImport(dst *ds.ImportPackage, importSpec *ast.ImportSpec) error
- func ParseIndexPart(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParseIndexPartTag(field *ast.Field, ind *ds.IndexDeclaration, indexMap map[string]int, ...) error
- func ParseIndexTag(field *ast.Field, ind *ds.IndexDeclaration, fieldsMap map[string]int) error
- func ParseIndexes(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParseMutators(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParsePartialStructFields(dst *ds.RecordPackage, name, pkgName, path string) ([]ds.PartialFieldDeclaration, error)
- func ParseProcFields(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParseProcFieldsTag(index int, field *ast.Field, newfield *ds.ProcFieldDeclaration) error
- func ParseSerializer(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParseTrigger(dst *ds.RecordPackage, fields []*ast.Field) error
- func ParseTriggerTag(trigger *ds.TriggerDeclaration, field *ast.Field) error
- func ParseTypeSerializer(dst *ds.RecordPackage, serializerName string, t interface{}) (string, error)
- type ParamValueRule
- type StructNameType
- type TagNameType
- type TypeName
Constants ¶
View Source
const ( NoCheckFlag = 0 CheckFlagEmpty = 1 << iota )
View Source
const NameDefaultRule = "__DEFAULT__"
Variables ¶
View Source
var PublicNameChecker = regexp.MustCompile("^[A-Z]")
View Source
var ToLower = cases.Lower(language.English)
Functions ¶
func ParseFieldType ¶ added in v1.9.0
func ParseFieldType(dst *ds.RecordPackage, name, pName string, t interface{}) (string, error)
func ParseFields ¶
func ParseFields(dst *ds.RecordPackage, fields []*ast.Field) error
Функция парсинга полей модели
func ParseFieldsObject ¶
func ParseFieldsObject(dst *ds.RecordPackage, fieldsobject []*ast.Field) error
Процесс парсинга декларативного описания связи между сущностями
func ParseFieldsTag ¶
func ParseFieldsTag(field *ast.Field, newfield *ds.FieldDeclaration, newindex *ds.IndexDeclaration) error
Функция парсинга тегов полей модели
func ParseFlags ¶
func ParseFlags(dst *ds.RecordPackage, fields []*ast.Field) error
Парсинг флагов. В описании модели можно указать, что целочисленное значение используется для хранения битовых флагов. В этом случае на поле навешиваются мутаторы SetFlag и ClearFlag
func ParseImport ¶
func ParseImport(dst *ds.ImportPackage, importSpec *ast.ImportSpec) error
func ParseIndexPart ¶
func ParseIndexPart(dst *ds.RecordPackage, fields []*ast.Field) error
func ParseIndexPartTag ¶
func ParseIndexPartTag(field *ast.Field, ind *ds.IndexDeclaration, indexMap map[string]int, fields []ds.FieldDeclaration, indexes []ds.IndexDeclaration) error
func ParseIndexTag ¶
func ParseIndexes ¶
func ParseIndexes(dst *ds.RecordPackage, fields []*ast.Field) error
func ParseMutators ¶ added in v1.9.0
func ParseMutators(dst *ds.RecordPackage, fields []*ast.Field) error
func ParsePartialStructFields ¶ added in v1.9.0
func ParsePartialStructFields(dst *ds.RecordPackage, name, pkgName, path string) ([]ds.PartialFieldDeclaration, error)
func ParseProcFields ¶ added in v1.6.0
func ParseProcFields(dst *ds.RecordPackage, fields []*ast.Field) error
ParseProcFields парсинг полей процедуры
func ParseProcFieldsTag ¶ added in v1.6.0
ParseProcFieldsTag парсинг тегов полей декларации процедуры
func ParseSerializer ¶
func ParseSerializer(dst *ds.RecordPackage, fields []*ast.Field) error
func ParseTrigger ¶
func ParseTrigger(dst *ds.RecordPackage, fields []*ast.Field) error
Парсинг заявленных триггеров в описании модели
func ParseTriggerTag ¶
func ParseTriggerTag(trigger *ds.TriggerDeclaration, field *ast.Field) error
func ParseTypeSerializer ¶
func ParseTypeSerializer(dst *ds.RecordPackage, serializerName string, t interface{}) (string, error)
Types ¶
type ParamValueRule ¶
type ParamValueRule int
const ( ParamNeedValue ParamValueRule = iota ParamNotNeedValue )
type StructNameType ¶
type StructNameType string
const ( Fields StructNameType = "Fields" ProcFields StructNameType = "ProcFields" FieldsObject StructNameType = "FieldsObject" Indexes StructNameType = "Indexes" IndexParts StructNameType = "IndexParts" Serializers StructNameType = "Serializers" Triggers StructNameType = "Triggers" Flags StructNameType = "Flags" Mutators StructNameType = "Mutators" )
type TagNameType ¶
type TagNameType string
const ( SelectorTag TagNameType = "selector" PrimaryKeyTag TagNameType = "primary_key" UniqueTag TagNameType = "unique" MutatorsTag TagNameType = "mutators" SizeTag TagNameType = "size" SerializerTag TagNameType = "serializer" FieldsTag TagNameType = "fields" OrderDescTag TagNameType = "orderdesc" ProcInputParamTag TagNameType = "input" ProcOutputParamTag TagNameType = "output" )
Click to show internal directories.
Click to hide internal directories.