Versions in this module Expand all Collapse all v1 v1.0.8 Jun 27, 2020 Changes in this version + func BuildFederatedModel(m *Model) error + func EnrichModel(m *Model) error + func EnrichModelObjects(m *Model) error + func PrintSchema(model Model) (string, error) + type Config struct + Connection ... + Package string + func LoadConfig() (c Config, err error) + func LoadConfigFromPath(p string) (c Config, err error) + func (c *Config) ConnMaxLifetime() float64 + func (c *Config) MaxIdleConnections() uint + func (c *Config) MaxOpenConnections() uint + type FilterMappingItem struct + InputType ast.Type + Operator string + Suffix string + ValueFormat string + func (f *FilterMappingItem) SuffixCamel() string + func (f *FilterMappingItem) WrapValueVariable(v string) string + type Model struct + Doc *ast.Document + func Parse(m string) (Model, error) + 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 struct + Def *ast.ObjectDefinition + Extension *ObjectExtension + Model *Model + 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) 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 struct + Def *ast.TypeExtensionDefinition + Model *Model + Object *Object + func (oe *ObjectExtension) ExtendsLocalObject() bool + func (oe *ObjectExtension) IsFederatedType() bool + type ObjectField struct + Def *ast.FieldDefinition + Obj *Object + 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) 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) IsFilterable() bool + func (o *ObjectField) IsIdentifier() bool + func (o *ObjectField) IsList() 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 ObjectRelationship struct + Def *ast.FieldDefinition + Obj *Object + 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)