Documentation ¶
Index ¶
- type Project
- func (p *Project) ConfigOverride(cfg *config.Config) error
- func (p *Project) ConstraintFieldHook(td *ast.Definition, fd *ast.FieldDefinition, f *modelgen.Field) (*modelgen.Field, error)
- func (p *Project) GetType() string
- func (p *Project) Init(Name string, ParentPackageName string, GeneratedFilePrefix string) error
- func (p *Project) ModelMutationHook(b *modelgen.ModelBuild) *modelgen.ModelBuild
- func (p *Project) PrepareTemplateData() *TemplateData
- func (p *Project) SchemaDocumentHook(schemaDocument *ast.SchemaDocument) error
- func (p *Project) SchemaHook(schema *ast.Schema) error
- func (p *Project) StandardTemplateBundleList() *tmpl.TemplateBundleList
- func (p *Project) TestsDirectory() string
- type ProjectOption
- type Resources
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Project ¶
type Project struct { Resources Resources // map of resource name to type name ResourceTypeNameToActionMap map[string][]string Name string ParentPackageName string GeneratedFilePrefix string // contains filtered or unexported fields }
Project is a default project configuration
func NewProject ¶
func NewProject(options ...ProjectOption) *Project
NewProject creates a new Project instance with default values
func (*Project) ConstraintFieldHook ¶
func (p *Project) ConstraintFieldHook(td *ast.Definition, fd *ast.FieldDefinition, f *modelgen.Field) (*modelgen.Field, error)
func (*Project) ModelMutationHook ¶
func (p *Project) ModelMutationHook(b *modelgen.ModelBuild) *modelgen.ModelBuild
func (*Project) PrepareTemplateData ¶
func (p *Project) PrepareTemplateData() *TemplateData
func (*Project) SchemaDocumentHook ¶
func (p *Project) SchemaDocumentHook(schemaDocument *ast.SchemaDocument) error
func (*Project) StandardTemplateBundleList ¶
func (p *Project) StandardTemplateBundleList() *tmpl.TemplateBundleList
func (*Project) TestsDirectory ¶
type ProjectOption ¶
func WithTestDir ¶
func WithTestDir(dir string) ProjectOption
type Resources ¶
func (*Resources) TypeExists ¶
Click to show internal directories.
Click to hide internal directories.