Documentation ¶
Index ¶
- func EnrichModel(m *Model) error
- func EnrichModelObjects(m *Model) error
- func PrintSchema(model Model) (string, error)
- type Config
- type FilterMappingItem
- type Model
- type Object
- func (o *Object) Columns() []ObjectColumn
- func (o *Object) HasRelationships() bool
- func (o *Object) LowerName() string
- func (o *Object) Name() string
- func (o *Object) PluralName() string
- func (o *Object) Relationship(name string) *ObjectRelationship
- func (o *Object) Relationships() []*ObjectRelationship
- func (o *Object) TableName() string
- type ObjectColumn
- func (o *ObjectColumn) FilterMapping() []FilterMappingItem
- func (o *ObjectColumn) GoType() string
- func (o *ObjectColumn) GoTypeWithPointer(showPointer bool) string
- func (o *ObjectColumn) IsCreatable() bool
- func (o *ObjectColumn) IsOptional() bool
- func (o *ObjectColumn) IsSearchable() bool
- func (o *ObjectColumn) IsUpdatable() bool
- func (o *ObjectColumn) MethodName() string
- func (o *ObjectColumn) ModelTags() string
- func (o *ObjectColumn) Name() string
- func (o *ObjectColumn) TargetType() string
- type ObjectRelationship
- func (o *ObjectRelationship) GoType() string
- func (o *ObjectRelationship) InverseRelationship() *ObjectRelationship
- func (o *ObjectRelationship) InverseRelationshipName() string
- func (o *ObjectRelationship) IsMainRelationshipForManyToMany() bool
- func (o *ObjectRelationship) IsManyToMany() bool
- func (o *ObjectRelationship) IsManyToOne() bool
- func (o *ObjectRelationship) IsOneToMany() bool
- func (o *ObjectRelationship) IsSelfReferencing() bool
- func (o *ObjectRelationship) IsToMany() bool
- func (o *ObjectRelationship) IsToOne() bool
- func (o *ObjectRelationship) JoinString() string
- func (o *ObjectRelationship) MainRelationshipForManyToMany() *ObjectRelationship
- func (o *ObjectRelationship) ManyToManyJoinTable() string
- func (o *ObjectRelationship) MethodName() string
- func (o *ObjectRelationship) ModelTags() string
- func (o *ObjectRelationship) Name() string
- func (o *ObjectRelationship) ReturnType() string
- func (o *ObjectRelationship) Target() *Object
- func (o *ObjectRelationship) TargetType() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FilterMappingItem ¶
type FilterMappingItem struct { Suffix string Operator string InputType ast.Type ValueFormat string }
func (*FilterMappingItem) SuffixCamel ¶
func (f *FilterMappingItem) SuffixCamel() string
func (*FilterMappingItem) WrapValueVariable ¶
func (f *FilterMappingItem) WrapValueVariable(v string) string
type Object ¶
type Object struct { Def *ast.ObjectDefinition Model *Model }
func (*Object) Columns ¶
func (o *Object) Columns() []ObjectColumn
func (*Object) HasRelationships ¶
func (*Object) PluralName ¶
func (*Object) Relationship ¶
func (o *Object) Relationship(name string) *ObjectRelationship
func (*Object) Relationships ¶
func (o *Object) Relationships() []*ObjectRelationship
type ObjectColumn ¶
type ObjectColumn struct { Def *ast.FieldDefinition Obj *Object }
func (*ObjectColumn) FilterMapping ¶
func (o *ObjectColumn) FilterMapping() []FilterMappingItem
func (*ObjectColumn) GoType ¶
func (o *ObjectColumn) GoType() string
func (*ObjectColumn) GoTypeWithPointer ¶
func (o *ObjectColumn) GoTypeWithPointer(showPointer bool) string
func (*ObjectColumn) IsCreatable ¶
func (o *ObjectColumn) IsCreatable() bool
func (*ObjectColumn) IsOptional ¶
func (o *ObjectColumn) IsOptional() bool
func (*ObjectColumn) IsSearchable ¶
func (o *ObjectColumn) IsSearchable() bool
func (*ObjectColumn) IsUpdatable ¶
func (o *ObjectColumn) IsUpdatable() bool
func (*ObjectColumn) MethodName ¶
func (o *ObjectColumn) MethodName() string
func (*ObjectColumn) ModelTags ¶
func (o *ObjectColumn) ModelTags() string
func (*ObjectColumn) Name ¶
func (o *ObjectColumn) Name() string
func (*ObjectColumn) TargetType ¶
func (o *ObjectColumn) TargetType() string
type ObjectRelationship ¶
type ObjectRelationship struct { Def *ast.FieldDefinition Obj *Object }
func (*ObjectRelationship) GoType ¶
func (o *ObjectRelationship) GoType() string
func (*ObjectRelationship) InverseRelationship ¶
func (o *ObjectRelationship) InverseRelationship() *ObjectRelationship
func (*ObjectRelationship) InverseRelationshipName ¶
func (o *ObjectRelationship) InverseRelationshipName() string
func (*ObjectRelationship) IsMainRelationshipForManyToMany ¶
func (o *ObjectRelationship) IsMainRelationshipForManyToMany() bool
func (*ObjectRelationship) IsManyToMany ¶
func (o *ObjectRelationship) IsManyToMany() bool
func (*ObjectRelationship) IsManyToOne ¶
func (o *ObjectRelationship) IsManyToOne() bool
func (*ObjectRelationship) IsOneToMany ¶
func (o *ObjectRelationship) IsOneToMany() bool
func (*ObjectRelationship) IsSelfReferencing ¶
func (o *ObjectRelationship) IsSelfReferencing() bool
func (*ObjectRelationship) IsToMany ¶
func (o *ObjectRelationship) IsToMany() bool
func (*ObjectRelationship) IsToOne ¶
func (o *ObjectRelationship) IsToOne() bool
func (*ObjectRelationship) JoinString ¶
func (o *ObjectRelationship) JoinString() string
func (*ObjectRelationship) MainRelationshipForManyToMany ¶
func (o *ObjectRelationship) MainRelationshipForManyToMany() *ObjectRelationship
func (*ObjectRelationship) ManyToManyJoinTable ¶
func (o *ObjectRelationship) ManyToManyJoinTable() string
func (*ObjectRelationship) MethodName ¶
func (o *ObjectRelationship) MethodName() string
func (*ObjectRelationship) ModelTags ¶
func (o *ObjectRelationship) ModelTags() string
func (*ObjectRelationship) Name ¶
func (o *ObjectRelationship) Name() string
func (*ObjectRelationship) ReturnType ¶
func (o *ObjectRelationship) ReturnType() string
func (*ObjectRelationship) Target ¶
func (o *ObjectRelationship) Target() *Object
func (*ObjectRelationship) TargetType ¶
func (o *ObjectRelationship) TargetType() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.