Documentation
¶
Index ¶
- Variables
- func ChangeToRootDir(rootDir string)
- func HasSchemaChanges(checksumFile string, directories ...string) (bool, error)
- func LoadCommentMap(patterns ...string) (map[string]string, error)
- func PruneWhereInputOps() entgql.SchemaHook
- func SetSchemaChecksum(checksumFile string, paths ...string) error
- func SetupLogging()
Constants ¶
This section is empty.
Variables ¶
var ErrLoadPackages = errors.New("failed to load packages")
ErrLoadPackages is returned when Go packages cannot be loaded for comment extraction
Functions ¶
func ChangeToRootDir ¶
func ChangeToRootDir(rootDir string)
ChangeToRootDir changes the working directory to the root of the repository
func HasSchemaChanges ¶
HasSchemaChanges checks if there have been changes to schema or generated files by comparing checksums of the relevant directories
func LoadCommentMap ¶
LoadCommentMap parses the packages matched by the given patterns and returns their Go doc comments keyed by "pkgpath.TypeName" for type declarations and "pkgpath.TypeName.FieldName" for exported struct fields; the key format is shared by the jsonschema reflector comment map and the OpenAPI schema customizer so both generators source descriptions the same way
func PruneWhereInputOps ¶
func PruneWhereInputOps() entgql.SchemaHook
PruneWhereInputOps removes the predicate fields listed in droppedWhereOps from every generated where input. A field is only removed when the same input also declares its base field, so a real schema field whose name happens to end in an op suffix is left alone
func SetSchemaChecksum ¶
SetSchemaChecksum updates the checksum file with the current checksum
func SetupLogging ¶
func SetupLogging()
SetupLogging sets up the logging for the code generation process
Types ¶
This section is empty.