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) 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) 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) 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) HasReadonlyColumns() bool
- func (o *Object) HasRelationship(name string) bool
- 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) Relationship(name string) *ObjectRelationship
- func (o *Object) Relationships() []*ObjectRelationship
- func (o *Object) TableName() string
- type ObjectExtension
- type ObjectField
- func (o *ObjectField) Directive(name string) *ast.Directive
- func (o *ObjectField) FilterMapping() []FilterMappingItem
- func (o *ObjectField) GoType() string
- func (o *ObjectField) GoTypeWithPointer(showPointer 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) IsColumn() bool
- func (o *ObjectField) IsCreatable() bool
- func (o *ObjectField) IsEmbedded() bool
- func (o *ObjectField) IsEnumType() bool
- func (o *ObjectField) IsList() bool
- func (o *ObjectField) IsOptional() bool
- func (o *ObjectField) IsReadonlyType() bool
- func (o *ObjectField) IsRelationship() bool
- func (o *ObjectField) IsScalarType() bool
- func (o *ObjectField) IsSearchable() 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 ObjectRelationship
- func (o *ObjectRelationship) ChangesName() string
- func (o *ObjectRelationship) ChangesType() 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) 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 ¶
func BuildFederatedModel ¶
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"` }
func LoadConfig ¶
func LoadConfigFromPath ¶
func (*Config) ConnMaxLifetime ¶
func (*Config) MaxIdleConnections ¶
func (*Config) MaxOpenConnections ¶
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 Model ¶
func (*Model) HasFederatedTypes ¶
func (*Model) HasObjectExtension ¶
func (*Model) ObjectEntities ¶
func (*Model) ObjectExtension ¶
func (m *Model) ObjectExtension(name string) ObjectExtension
func (*Model) ObjectExtensions ¶
func (m *Model) ObjectExtensions() []ObjectExtension
func (*Model) RemoveObjectExtension ¶
func (m *Model) RemoveObjectExtension(oe *ObjectExtension)
type Object ¶
type Object struct { Def *ast.ObjectDefinition Model *Model Extension *ObjectExtension }
func (*Object) Column ¶
func (o *Object) Column(name string) *ObjectField
func (*Object) Columns ¶
func (o *Object) Columns() []ObjectField
func (*Object) Field ¶
func (o *Object) Field(name string) *ObjectField
func (*Object) Fields ¶
func (o *Object) Fields() []ObjectField
func (*Object) HasAnyRelationships ¶
func (*Object) HasDirective ¶
func (*Object) HasEmbeddedField ¶
func (*Object) HasReadonlyColumns ¶
func (*Object) HasRelationship ¶
func (*Object) IsExtended ¶
func (*Object) IsFederatedType ¶
func (*Object) IsToManyColumn ¶
func (o *Object) IsToManyColumn(c ObjectField) bool
func (*Object) NeedsQueryResolver ¶
func (*Object) PluralName ¶
func (*Object) Relationship ¶
func (o *Object) Relationship(name string) *ObjectRelationship
func (*Object) Relationships ¶
func (o *Object) Relationships() []*ObjectRelationship
type ObjectExtension ¶
type ObjectExtension struct { Def *ast.TypeExtensionDefinition Model *Model Object *Object }
func (*ObjectExtension) ExtendsLocalObject ¶
func (oe *ObjectExtension) ExtendsLocalObject() bool
func (*ObjectExtension) IsFederatedType ¶
func (oe *ObjectExtension) IsFederatedType() bool
type ObjectField ¶
type ObjectField struct { Def *ast.FieldDefinition Obj *Object }
func (*ObjectField) FilterMapping ¶
func (o *ObjectField) FilterMapping() []FilterMappingItem
func (*ObjectField) GoType ¶
func (o *ObjectField) GoType() string
func (*ObjectField) GoTypeWithPointer ¶
func (o *ObjectField) GoTypeWithPointer(showPointer bool) string
func (*ObjectField) HasDirective ¶
func (o *ObjectField) HasDirective(name string) bool
func (*ObjectField) HasTargetObject ¶
func (o *ObjectField) HasTargetObject() bool
func (*ObjectField) HasTargetObjectExtension ¶
func (o *ObjectField) HasTargetObjectExtension() bool
func (*ObjectField) HasTargetTypeWithIDField ¶
func (o *ObjectField) HasTargetTypeWithIDField() bool
func (*ObjectField) IsColumn ¶
func (o *ObjectField) IsColumn() bool
func (*ObjectField) IsCreatable ¶
func (o *ObjectField) IsCreatable() bool
func (*ObjectField) IsEmbedded ¶
func (o *ObjectField) IsEmbedded() bool
func (*ObjectField) IsEnumType ¶
func (o *ObjectField) IsEnumType() bool
func (*ObjectField) IsList ¶
func (o *ObjectField) IsList() bool
func (*ObjectField) IsOptional ¶
func (o *ObjectField) IsOptional() bool
func (*ObjectField) IsReadonlyType ¶
func (o *ObjectField) IsReadonlyType() bool
func (*ObjectField) IsRelationship ¶
func (o *ObjectField) IsRelationship() bool
func (*ObjectField) IsScalarType ¶
func (o *ObjectField) IsScalarType() bool
func (*ObjectField) IsSearchable ¶
func (o *ObjectField) IsSearchable() bool
func (*ObjectField) IsString ¶ added in v0.0.3
func (o *ObjectField) IsString() bool
func (*ObjectField) IsUpdatable ¶
func (o *ObjectField) IsUpdatable() bool
func (*ObjectField) IsWritableType ¶
func (o *ObjectField) IsWritableType() bool
func (*ObjectField) MethodName ¶
func (o *ObjectField) MethodName() string
func (*ObjectField) ModelTags ¶
func (o *ObjectField) ModelTags() string
func (*ObjectField) Name ¶
func (o *ObjectField) Name() string
func (*ObjectField) NeedsQueryResolver ¶
func (o *ObjectField) NeedsQueryResolver() bool
func (*ObjectField) TargetObject ¶
func (o *ObjectField) TargetObject() *Object
func (*ObjectField) TargetObjectExtension ¶
func (o *ObjectField) TargetObjectExtension() *ObjectExtension
func (*ObjectField) TargetType ¶
func (o *ObjectField) TargetType() string
type ObjectRelationship ¶
type ObjectRelationship struct { Def *ast.FieldDefinition Obj *Object }
func (*ObjectRelationship) ChangesName ¶
func (o *ObjectRelationship) ChangesName() string
func (*ObjectRelationship) ChangesType ¶
func (o *ObjectRelationship) ChangesType() string
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) IsNonNull ¶
func (o *ObjectRelationship) IsNonNull() 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 ¶
- 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-extension.go
- model.object-field.go
- model.object-relationship.go
- model.object.go
- parser.go
- printer.go
Click to show internal directories.
Click to hide internal directories.