Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed templates/auth.tmpl Authtmpl []byte //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 //go:embed templates/libconfig.tmpl LibConfigtmpl []byte //go:embed templates/configjson.tmpl ConfigJSONtmpl []byte //go:embed templates/configdb.tmpl ConfigDBtmpl []byte //go:embed templates/confighttp.tmpl ConfigHTTPtmpl []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 GqlGenerate struct { Schema *ast.Schema ModuleName string ModulePath string ModelPath string ResolverPath string UnionPath string ScalarPath string EnumPath string ObjecttypePath string LibPath string SchemaPath string }
func NewGqlGenerate ¶ added in v0.12.0
func NewGqlGenerate(schema *ast.Schema, schemaPath string) (r GqlGenerate)
type ModelDef ¶
type ModelDef struct { Name string RealName string PackageName string Attr []AttrDef DriverDB string IsDriverDB bool 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.