Documentation ¶
Index ¶
- func BuildFederatedModel(m *Model) error
- func EnrichModel(m *Model) error
- func EnrichModelObjects(m *Model) error
- func IndexOf(str []interface{}, data interface{}) int
- func PrintSchema(model Model) (string, error)
- func RegexpReplace(str, start string, end string) string
- func ReplaceAll(data, reg, target string) string
- func ToLower(str string) string
- 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) EntityName() string
- 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
- type ObjectField
- func (o *ObjectField) Arguments() string
- func (o *ObjectField) Columns() []ObjectField
- func (o *ObjectField) Directive(name string) *ast.Directive
- func (o *ObjectField) EntityName() string
- func (o *ObjectField) Fields() string
- func (o *ObjectField) FilterMapping() []FilterMappingItem
- func (o *ObjectField) GetArgValue(name string) map[string]map[string]string
- func (o *ObjectField) GetComment() string
- func (o *ObjectField) GetDefault() string
- func (o *ObjectField) GetRemark() string
- func (o *ObjectField) GetType() string
- func (o *ObjectField) GetValidator() string
- 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) Inputs() string
- func (o *ObjectField) IsColumn() bool
- func (o *ObjectField) IsCreatable() bool
- func (o *ObjectField) IsDel() bool
- func (o *ObjectField) IsEmbedded() bool
- func (o *ObjectField) IsEnumType() bool
- func (o *ObjectField) IsIdentifier() bool
- func (o *ObjectField) IsList() bool
- func (o *ObjectField) IsOptional() bool
- func (o *ObjectField) IsPassWord() bool
- func (o *ObjectField) IsReadonlyType() bool
- func (o *ObjectField) IsRelationship() bool
- func (o *ObjectField) IsRequired() bool
- func (o *ObjectField) IsScalarType() bool
- func (o *ObjectField) IsSearchable() bool
- func (o *ObjectField) IsSortable() bool
- func (o *ObjectField) IsState() bool
- func (o *ObjectField) IsString() bool
- func (o *ObjectField) IsUpdatable() bool
- func (o *ObjectField) IsWritableType() bool
- func (o *ObjectField) LowerName() string
- 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) BoolForRelationshipDirectiveAttribute(name string) (val bool, ok bool)
- 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) LowerName() 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) 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)
- type ObjectValid
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
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) 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) IsToManyColumn ¶
func (o *Object) IsToManyColumn(c ObjectField) bool
func (*Object) PreloadableRelationships ¶
func (o *Object) PreloadableRelationships() []*ObjectRelationship
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) Columns ¶
func (o *ObjectField) Columns() []ObjectField
func (*ObjectField) Directive ¶
func (o *ObjectField) Directive(name string) *ast.Directive
func (*ObjectField) FilterMapping ¶
func (o *ObjectField) FilterMapping() []FilterMappingItem
func (*ObjectField) GetArgValue ¶
func (o *ObjectField) GetArgValue(name string) map[string]map[string]string
maiguangyang new add
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) IsDel ¶
func (o *ObjectField) IsDel() bool
func (*ObjectField) IsEmbedded ¶
func (o *ObjectField) IsEmbedded() bool
func (*ObjectField) IsEnumType ¶
func (o *ObjectField) IsEnumType() bool
func (*ObjectField) IsIdentifier ¶
func (o *ObjectField) IsIdentifier() bool
func (*ObjectField) IsList ¶
func (o *ObjectField) IsList() bool
func (*ObjectField) IsOptional ¶
func (o *ObjectField) IsOptional() bool
func (*ObjectField) IsPassWord ¶
func (o *ObjectField) IsPassWord() bool
func (*ObjectField) IsReadonlyType ¶
func (o *ObjectField) IsReadonlyType() bool
func (*ObjectField) IsRelationship ¶
func (o *ObjectField) IsRelationship() bool
func (*ObjectField) IsRequired ¶
func (o *ObjectField) IsRequired() bool
func (*ObjectField) IsScalarType ¶
func (o *ObjectField) IsScalarType() bool
func (*ObjectField) IsSearchable ¶
func (o *ObjectField) IsSearchable() bool
func (*ObjectField) IsSortable ¶
func (o *ObjectField) IsSortable() bool
func (*ObjectField) IsState ¶
func (o *ObjectField) IsState() bool
func (*ObjectField) IsString ¶
func (o *ObjectField) IsString() bool
func (*ObjectField) IsUpdatable ¶
func (o *ObjectField) IsUpdatable() bool
func (*ObjectField) IsWritableType ¶
func (o *ObjectField) IsWritableType() bool
func (*ObjectField) LowerName ¶
func (o *ObjectField) LowerName() string
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) BoolForRelationshipDirectiveAttribute ¶
func (o *ObjectRelationship) BoolForRelationshipDirectiveAttribute(name string) (val bool, ok bool)
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) LowerName ¶
func (o *ObjectRelationship) LowerName() 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) Preload ¶
func (o *ObjectRelationship) Preload() bool
func (*ObjectRelationship) ReturnType ¶
func (o *ObjectRelationship) ReturnType() string
func (*ObjectRelationship) StringForRelationshipDirectiveAttribute ¶
func (o *ObjectRelationship) StringForRelationshipDirectiveAttribute(name string) (val string, ok bool)
func (*ObjectRelationship) Target ¶
func (o *ObjectRelationship) Target() *Object
func (*ObjectRelationship) TargetType ¶
func (o *ObjectRelationship) TargetType() string
func (*ObjectRelationship) ValueForRelationshipDirectiveAttribute ¶
func (o *ObjectRelationship) ValueForRelationshipDirectiveAttribute(name string) (val interface{}, ok bool)
type ObjectValid ¶
type ObjectValid struct { Def *ast.FieldDefinition Obj *Object }
func (*ObjectValid) GoType ¶
func (o *ObjectValid) GoType() string
func (*ObjectValid) InverseValidatorName ¶
func (o *ObjectValid) InverseValidatorName() string
func (*ObjectValid) MethodName ¶
func (o *ObjectValid) MethodName() string
func (*ObjectValid) ModelTags ¶
func (o *ObjectValid) ModelTags() string
func (*ObjectValid) Name ¶
func (o *ObjectValid) Name() string
func (*ObjectValid) ReturnType ¶
func (o *ObjectValid) ReturnType() 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
- lodash.go
- model.federation.go
- model.go
- model.object-extension.go
- model.object-field.go
- model.object-relationship.go
- model.object-valid.go
- model.object.go
- parser.go
- printer.go
Click to show internal directories.
Click to hide internal directories.