binding

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Value string
	// Details is used for many-to-many relations instead of `value` for brackets content.
	// e.g. relation(name=manyToManyRelName,to=TargetEntity)
	Details map[string]*Annotation
}

Annotation is a tag on a struct-field

type Field

type Field struct {
	ModelProperty *model.Property
	Name          string
	IsSkipped     bool
}

Field holds common field/property information used by specialized code parsers/generators. Additionally, it groups some shared logic, e.g. annotation processing

func CreateField

func CreateField(prop *model.Property) *Field

func (*Field) PreProcessAnnotations

func (field *Field) PreProcessAnnotations(a map[string]*Annotation) error

func (*Field) ProcessAnnotations

func (field *Field) ProcessAnnotations(a map[string]*Annotation) error

ProcessAnnotations checks all set annotations for any inconsistencies and sets local/property fields (flags, name, ...)

func (*Field) SetName

func (field *Field) SetName(name string)

type Object

type Object struct {
	ModelEntity *model.Entity
	Name        string
	Namespace   string
	IsSkipped   bool
}

Object holds common entity information used by specialized code parsers/generators. Additionally, it groups some shared logic, e.g. annotation processing

func CreateObject

func CreateObject(entity *model.Entity) *Object

func (*Object) AddRelation added in v0.10.0

func (object *Object) AddRelation(details map[string]*Annotation) (*model.StandaloneRelation, error)

func (*Object) ProcessAnnotations

func (object *Object) ProcessAnnotations(a map[string]*Annotation) error

ProcessAnnotations checks all set annotations for any inconsistencies and sets local/entity properties (uid, name, ...)

func (*Object) SetName

func (object *Object) SetName(name string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL