Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed templates/model.tmpl Modeltmpl []byte //go:embed templates/enum.tmpl Enumtmpl []byte //go:embed templates/union.tmpl Uniontmpl []byte //go:embed templates/scalar.tmpl Scalartmpl []byte //go:embed templates/objecttype_definition.tmpl Objecttypetmpl []byte //go:embed templates/queries.tmpl Queriestmpl []byte //go:embed templates/mutations.tmpl Mutationstmpl []byte //go:embed templates/subscriptions.tmpl Subscriptionstmpl []byte //go:embed templates/main.tmpl Maintmpl []byte )
View Source
var IndexIDName = []string{
"_id",
"id",
}
View Source
var OmitObject = []string{
"__Directive",
"__EnumValue",
"__Field",
"__InputValue",
"__Schema",
"__Type",
"__TypeKind",
"__DirectiveLocation",
}
View Source
var OmitScalarTypes = []string{
"Int",
"Float",
"String",
"Boolean",
}
Functions ¶
func GetNamedType ¶
Types ¶
type EnumAttrDef ¶
type EnumDef ¶
type EnumDef struct { Name string PackageName string Attr []EnumAttrDef FilePath string }
type GqlGenerate ¶
type ModelDef ¶
type ModelDef struct { Name string RealName string PackageName string Attr []AttrDef IsUseID bool IsUseUnion bool IsUseScalar bool IsUseEnum bool FilePath string ModelPath string ScalarPath string UnionPath string EnumPath string ObjectTypePath string QueryPath string MutationPath string SubscriptionPath string GQLFile string }
type ObjectTypeDef ¶
type ObjectTypeDef struct { Name string PackageName string RealName string ModelPath string ModuleName string DefinitionPath string FilePath string QueryPath string MutationPath string SubscriptionPath string HasQueries bool HasMutations bool HasSubscriptions bool QueryResolvers []map[string]string MutationResolvers []map[string]string SubscriptionResolvers []map[string]string }
type RenderTypes ¶
type UnionAttrDef ¶
type UnionDef ¶
type UnionDef struct { PackageName string Type []UnionAttrDef FilePath string }
Click to show internal directories.
Click to hide internal directories.