Documentation ¶
Index ¶
- func BuildFederatedModel(m *Model) error
- func EnrichModel(m *Model) error
- func EnrichModelObjects(m *Model) error
- func PrintSchema(model Model) (string, error)
- type Config
- type FilterMappingItem
- type Model
- func (m *Model) EmbeddedObjects() []Object
- func (m *Model) HasEnum(name string) bool
- func (m *Model) HasFederatedTypes() bool
- func (m *Model) HasObject(name string) bool
- func (m *Model) HasObjectExtension(name string) bool
- func (m *Model) HasScalar(name string) bool
- func (m *Model) Object(name string) Object
- func (m *Model) ObjectEntities() []Object
- func (m *Model) ObjectExtension(name string) ObjectExtension
- func (m *Model) ObjectExtensions() []ObjectExtension
- func (m *Model) Objects() []Object
- func (m *Model) RemoveObjectExtension(oe *ObjectExtension)
- type Object
- func (o *Object) AggregationsByField() (res map[string]*ObjectFieldAggregation)
- func (o *Object) Column(name string) *ObjectField
- func (o *Object) Columns() []ObjectField
- func (o *Object) Directive(name string) *ast.Directive
- func (o *Object) Field(name string) *ObjectField
- func (o *Object) Fields() []ObjectField
- func (o *Object) HasAggregableColumn() bool
- func (o *Object) HasAnyRelationships() bool
- func (o *Object) HasColumn(name string) bool
- func (o *Object) HasDirective(name string) bool
- func (o *Object) HasEmbeddedField() bool
- func (o *Object) HasField(name string) bool
- func (o *Object) HasPreloadableRelationships() bool
- func (o *Object) HasReadonlyColumns() bool
- func (o *Object) HasRelationship(name string) bool
- func (o *Object) Interfaces() []string
- func (o *Object) IsExtended() bool
- func (o *Object) IsFederatedType() bool
- func (o *Object) IsToManyColumn(c ObjectField) bool
- func (o *Object) LowerName() string
- func (o *Object) Name() string
- func (o *Object) NeedsQueryResolver() bool
- func (o *Object) PluralName() string
- func (o *Object) PreloadableRelationships() []*ObjectRelationship
- func (o *Object) Relationship(name string) *ObjectRelationship
- func (o *Object) Relationships() []*ObjectRelationship
- func (o *Object) TableName() string
- type ObjectExtension
- type ObjectField
- func (o *ObjectField) Aggregations() []ObjectFieldAggregation
- func (o *ObjectField) ColumnType() (value string)
- func (o *ObjectField) Directive(name string) *ast.Directive
- func (o *ObjectField) FilterMapping() []FilterMappingItem
- func (o *ObjectField) GoResultType() string
- func (o *ObjectField) GoType() string
- func (o *ObjectField) GoTypeWithPointer(showPointer, ignoreEmbedded bool) string
- func (o *ObjectField) HasDirective(name string) bool
- func (o *ObjectField) HasTargetObject() bool
- func (o *ObjectField) HasTargetObjectExtension() bool
- func (o *ObjectField) HasTargetTypeWithIDField() bool
- func (o *ObjectField) InputType() ast.Type
- func (o *ObjectField) InputTypeName() string
- func (o *ObjectField) IsAggregable() bool
- func (o *ObjectField) IsColumn() bool
- func (o *ObjectField) IsCreatable() bool
- func (o *ObjectField) IsEmbedded() bool
- func (o *ObjectField) IsEmbeddedColumn() bool
- func (o *ObjectField) IsEnumType() bool
- func (o *ObjectField) IsExternal() bool
- func (o *ObjectField) IsFilterable() bool
- func (o *ObjectField) IsIdentifier() bool
- func (o *ObjectField) IsList() bool
- func (o *ObjectField) IsNumeric() bool
- func (o *ObjectField) IsOptional() bool
- func (o *ObjectField) IsReadonlyType() bool
- func (o *ObjectField) IsRelationship() bool
- func (o *ObjectField) IsRelationshipIdentifier() bool
- func (o *ObjectField) IsScalarType() bool
- func (o *ObjectField) IsSearchable() bool
- func (o *ObjectField) IsSortable() bool
- func (o *ObjectField) IsString() bool
- func (o *ObjectField) IsUpdatable() bool
- func (o *ObjectField) IsWritableType() bool
- func (o *ObjectField) MethodName() string
- func (o *ObjectField) ModelTags() string
- func (o *ObjectField) Name() string
- func (o *ObjectField) NeedsQueryResolver() bool
- func (o *ObjectField) TargetObject() *Object
- func (o *ObjectField) TargetObjectExtension() *ObjectExtension
- func (o *ObjectField) TargetType() string
- type ObjectFieldAggregation
- type ObjectRelationship
- func (o *ObjectRelationship) BoolForRelationshipDirectiveAttribute(name string) (val bool, ok bool)
- func (o *ObjectRelationship) ChangesName() string
- func (o *ObjectRelationship) ChangesType() string
- func (o *ObjectRelationship) ForeignKeyDestinationColumn() string
- 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) IsNonNull() 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) ManyToManyObjectName() string
- func (o *ObjectRelationship) MethodName() string
- func (o *ObjectRelationship) ModelTags() string
- func (o *ObjectRelationship) Name() string
- func (o *ObjectRelationship) OnDelete(def string) string
- func (o *ObjectRelationship) OnUpdate(def string) string
- func (o *ObjectRelationship) Preload() bool
- func (o *ObjectRelationship) ReturnType() string
- func (o *ObjectRelationship) StringForRelationshipDirectiveAttribute(name string) (val string, ok bool)
- func (o *ObjectRelationship) Target() *Object
- func (o *ObjectRelationship) TargetType() string
- func (o *ObjectRelationship) ValueForRelationshipDirectiveAttribute(name string) (val interface{}, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Package string `json:"package"` Connection *struct { MaxIdleConnections *uint `json:"maxIdleConnections"` ConnMaxLifetime *string `json:"connMaxLifetime"` MaxOpenConnections *uint `json:"maxOpenConnections"` } `json:"connection,omitempty"` }
Config ...
func LoadConfigFromPath ¶
LoadConfigFromPath ...
func (*Config) MaxIdleConnections ¶
MaxIdleConnections ...
func (*Config) MaxOpenConnections ¶
MaxOpenConnections ...
type FilterMappingItem ¶
type FilterMappingItem struct { Suffix string Operator string InputType ast.Type ValueFormat string }
FilterMappingItem ...
func (*FilterMappingItem) SuffixCamel ¶
func (f *FilterMappingItem) SuffixCamel() string
SuffixCamel ...
func (*FilterMappingItem) WrapValueVariable ¶
func (f *FilterMappingItem) WrapValueVariable(v string) string
WrapValueVariable ...
type Model ¶
Model ...
func (*Model) EmbeddedObjects ¶ added in v0.2.0
EmbeddedObjects ...
func (*Model) HasObjectExtension ¶
HasObjectExtension ...
func (*Model) ObjectExtension ¶
func (m *Model) ObjectExtension(name string) ObjectExtension
ObjectExtension ...
func (*Model) ObjectExtensions ¶
func (m *Model) ObjectExtensions() []ObjectExtension
ObjectExtensions ...
func (*Model) RemoveObjectExtension ¶
func (m *Model) RemoveObjectExtension(oe *ObjectExtension)
RemoveObjectExtension ...
type Object ¶
type Object struct { Def *ast.ObjectDefinition Model *Model Extension *ObjectExtension }
Object ...
func (*Object) AggregationsByField ¶ added in v0.4.21
func (o *Object) AggregationsByField() (res map[string]*ObjectFieldAggregation)
AggregationsByField ...
func (*Object) HasAggregableColumn ¶ added in v0.4.21
HasAggregableColumn ...
func (*Object) HasAnyRelationships ¶
HasAnyRelationships ...
func (*Object) HasPreloadableRelationships ¶ added in v0.1.0
HasPreloadableRelationships ...
func (*Object) HasReadonlyColumns ¶
HasReadonlyColumns ...
func (*Object) HasRelationship ¶
HasRelationship ....
func (*Object) IsToManyColumn ¶
func (o *Object) IsToManyColumn(c ObjectField) bool
IsToManyColumn ...
func (*Object) NeedsQueryResolver ¶
NeedsQueryResolver ....
func (*Object) PreloadableRelationships ¶ added in v0.1.0
func (o *Object) PreloadableRelationships() []*ObjectRelationship
PreloadableRelationships ...
func (*Object) Relationship ¶
func (o *Object) Relationship(name string) *ObjectRelationship
Relationship ...
func (*Object) Relationships ¶
func (o *Object) Relationships() []*ObjectRelationship
Relationships ...
type ObjectExtension ¶
type ObjectExtension struct { Def *ast.TypeExtensionDefinition Model *Model Object *Object }
ObjectExtension ...
func (*ObjectExtension) ExtendsLocalObject ¶
func (oe *ObjectExtension) ExtendsLocalObject() bool
ExtendsLocalObject ...
func (*ObjectExtension) HasAnyNonExternalField ¶ added in v0.4.21
func (oe *ObjectExtension) HasAnyNonExternalField() bool
IsExternal ...
func (*ObjectExtension) IsFederatedType ¶
func (oe *ObjectExtension) IsFederatedType() bool
IsFederatedType ...
type ObjectField ¶
type ObjectField struct { Def *ast.FieldDefinition Obj *Object }
ObjectField ...
func (*ObjectField) Aggregations ¶ added in v0.4.12
func (o *ObjectField) Aggregations() []ObjectFieldAggregation
Aggregations ...
func (*ObjectField) ColumnType ¶ added in v0.2.0
func (o *ObjectField) ColumnType() (value string)
ColumnType ...
func (*ObjectField) Directive ¶
func (o *ObjectField) Directive(name string) *ast.Directive
Directive ...
func (*ObjectField) FilterMapping ¶
func (o *ObjectField) FilterMapping() []FilterMappingItem
FilterMapping ...
func (*ObjectField) GoResultType ¶ added in v0.2.0
func (o *ObjectField) GoResultType() string
GoResultType ...
func (*ObjectField) GoTypeWithPointer ¶
func (o *ObjectField) GoTypeWithPointer(showPointer, ignoreEmbedded bool) string
GoTypeWithPointer ...
func (*ObjectField) HasDirective ¶
func (o *ObjectField) HasDirective(name string) bool
HasDirective ...
func (*ObjectField) HasTargetObject ¶
func (o *ObjectField) HasTargetObject() bool
HasTargetObject ...
func (*ObjectField) HasTargetObjectExtension ¶
func (o *ObjectField) HasTargetObjectExtension() bool
HasTargetObjectExtension ...
func (*ObjectField) HasTargetTypeWithIDField ¶
func (o *ObjectField) HasTargetTypeWithIDField() bool
HasTargetTypeWithIDField ...
func (*ObjectField) InputType ¶ added in v0.2.0
func (o *ObjectField) InputType() ast.Type
InputType ...
func (*ObjectField) InputTypeName ¶ added in v0.2.0
func (o *ObjectField) InputTypeName() string
InputTypeName ...
func (*ObjectField) IsAggregable ¶ added in v0.4.21
func (o *ObjectField) IsAggregable() bool
IsAggregable ...
func (*ObjectField) IsEmbeddedColumn ¶ added in v0.2.0
func (o *ObjectField) IsEmbeddedColumn() bool
IsEmbeddedColumn ...
func (*ObjectField) IsExternal ¶ added in v0.4.21
func (o *ObjectField) IsExternal() bool
IsExternal ...
func (*ObjectField) IsFilterable ¶ added in v0.2.0
func (o *ObjectField) IsFilterable() bool
IsFilterable ...
func (*ObjectField) IsIdentifier ¶ added in v0.1.10
func (o *ObjectField) IsIdentifier() bool
IsIdentifier ...
func (*ObjectField) IsNumeric ¶ added in v0.4.12
func (o *ObjectField) IsNumeric() bool
IsNumeric ...
func (*ObjectField) IsRelationshipIdentifier ¶ added in v0.2.0
func (o *ObjectField) IsRelationshipIdentifier() bool
IsRelationshipIdentifier ...
func (*ObjectField) IsSortable ¶ added in v0.1.0
func (o *ObjectField) IsSortable() bool
IsSortable ...
func (*ObjectField) NeedsQueryResolver ¶
func (o *ObjectField) NeedsQueryResolver() bool
NeedsQueryResolver ...
func (*ObjectField) TargetObjectExtension ¶
func (o *ObjectField) TargetObjectExtension() *ObjectExtension
TargetObjectExtension ...
type ObjectFieldAggregation ¶ added in v0.4.12
ObjectFieldAggregation specifies which aggregation functions are supported for given field
func (*ObjectFieldAggregation) FieldName ¶ added in v0.4.21
func (a *ObjectFieldAggregation) FieldName() string
FieldName ...
func (*ObjectFieldAggregation) SQLColumn ¶ added in v0.4.21
func (a *ObjectFieldAggregation) SQLColumn() string
SQLColumn ...
type ObjectRelationship ¶
type ObjectRelationship struct { Def *ast.FieldDefinition Obj *Object }
ObjectRelationship ...
func (*ObjectRelationship) BoolForRelationshipDirectiveAttribute ¶ added in v0.1.0
func (o *ObjectRelationship) BoolForRelationshipDirectiveAttribute(name string) (val bool, ok bool)
BoolForRelationshipDirectiveAttribute ...
func (*ObjectRelationship) ChangesName ¶
func (o *ObjectRelationship) ChangesName() string
ChangesName ...
func (*ObjectRelationship) ChangesType ¶
func (o *ObjectRelationship) ChangesType() string
ChangesType ...
func (*ObjectRelationship) ForeignKeyDestinationColumn ¶ added in v0.3.0
func (o *ObjectRelationship) ForeignKeyDestinationColumn() string
ForeignKeyDestinationColumn ...
func (*ObjectRelationship) InverseRelationship ¶
func (o *ObjectRelationship) InverseRelationship() *ObjectRelationship
InverseRelationship ...
func (*ObjectRelationship) InverseRelationshipName ¶
func (o *ObjectRelationship) InverseRelationshipName() string
InverseRelationshipName ...
func (*ObjectRelationship) IsMainRelationshipForManyToMany ¶
func (o *ObjectRelationship) IsMainRelationshipForManyToMany() bool
IsMainRelationshipForManyToMany ...
func (*ObjectRelationship) IsManyToMany ¶
func (o *ObjectRelationship) IsManyToMany() bool
IsManyToMany ...
func (*ObjectRelationship) IsManyToOne ¶
func (o *ObjectRelationship) IsManyToOne() bool
IsManyToOne ...
func (*ObjectRelationship) IsOneToMany ¶
func (o *ObjectRelationship) IsOneToMany() bool
IsOneToMany ...
func (*ObjectRelationship) IsSelfReferencing ¶
func (o *ObjectRelationship) IsSelfReferencing() bool
IsSelfReferencing ...
func (*ObjectRelationship) JoinString ¶
func (o *ObjectRelationship) JoinString() string
JoinString ...
func (*ObjectRelationship) MainRelationshipForManyToMany ¶
func (o *ObjectRelationship) MainRelationshipForManyToMany() *ObjectRelationship
MainRelationshipForManyToMany ...
func (*ObjectRelationship) ManyToManyJoinTable ¶
func (o *ObjectRelationship) ManyToManyJoinTable() string
ManyToManyJoinTable ...
func (*ObjectRelationship) ManyToManyObjectName ¶ added in v0.3.0
func (o *ObjectRelationship) ManyToManyObjectName() string
ManyToManyObjectName ...
func (*ObjectRelationship) MethodName ¶
func (o *ObjectRelationship) MethodName() string
MethodName ...
func (*ObjectRelationship) ModelTags ¶
func (o *ObjectRelationship) ModelTags() string
ModelTags ...
func (*ObjectRelationship) OnDelete ¶ added in v0.3.0
func (o *ObjectRelationship) OnDelete(def string) string
OnDelete ...
func (*ObjectRelationship) OnUpdate ¶ added in v0.3.0
func (o *ObjectRelationship) OnUpdate(def string) string
OnUpdate ...
func (*ObjectRelationship) Preload ¶ added in v0.1.0
func (o *ObjectRelationship) Preload() bool
Preload ...
func (*ObjectRelationship) ReturnType ¶
func (o *ObjectRelationship) ReturnType() string
ReturnType ...
func (*ObjectRelationship) StringForRelationshipDirectiveAttribute ¶ added in v0.1.0
func (o *ObjectRelationship) StringForRelationshipDirectiveAttribute(name string) (val string, ok bool)
StringForRelationshipDirectiveAttribute ...
func (*ObjectRelationship) TargetType ¶
func (o *ObjectRelationship) TargetType() string
TargetType ...
func (*ObjectRelationship) ValueForRelationshipDirectiveAttribute ¶ added in v0.1.0
func (o *ObjectRelationship) ValueForRelationshipDirectiveAttribute(name string) (val interface{}, ok bool)
ValueForRelationshipDirectiveAttribute ...
Source Files ¶
- config.go
- definition.federation.go
- definition.filter.go
- definition.inputs.go
- definition.mutation.go
- definition.query.go
- definition.result-type.go
- definition.sorting.go
- enrichment.go
- graphql-helpers.go
- model.federation.go
- model.go
- model.object-aggregations.go
- model.object-extension.go
- model.object-field-aggregations.go
- model.object-field-directives.go
- model.object-field.go
- model.object-relationship.go
- model.object.go
- parser.go
- printer.go