Versions in this module Expand all Collapse all v0 v0.5.7 Nov 11, 2024 Changes in this version + const DefaultDependencyDir + const DefaultDomainPath + const DefaultEntityId + const DefaultEntityPath + const DefaultInputsPath + const DefaultOutputsPath + const DefaultTestingPath + const DefaultUseCasesPath + const TorpedoDir + const TorpedoDocsDir + const TorpedoEntitiesDir + const TorpedoUseCasesDir + var ErrEntityProvidedVersionNotSupported = errors.New("the provided version is not supported") + var ErrInvalidEntityProvidedVersion = errors.New("the provided entity mismatch with the version") + var ErrKindNotSupported = errors.New("the provided kind is not supported") + type CodeGenerator struct + func NewCodeGenerator(opts *Options) *CodeGenerator + type EntityViewGeneratorV1 struct + func NewEntityViewGeneratorV1(entity v1.EntitySpec, opts ViewOptions) (*EntityViewGeneratorV1, error) + func (v *EntityViewGeneratorV1) AddRelationshipField(fieldId data.EntitySchemaItem) + func (v *EntityViewGeneratorV1) EntityView() *data.EntityView + func (v *EntityViewGeneratorV1) GenerateEntityView() (*data.EntityView, error) + func (v *EntityViewGeneratorV1) HasRelationships() bool + func (v *EntityViewGeneratorV1) HydrateRelationships(viewGenerators map[string]IEntityViewGenerator) + type GoEngine struct + func New(opts *Options) *GoEngine + func (e *GoEngine) Fire() []error + func (e *GoEngine) Init() error + type IEntityViewGenerator interface + AddRelationshipField func(fieldId data.EntitySchemaItem) + EntityView func() *data.EntityView + GenerateEntityView func() (*data.EntityView, error) + HasRelationships func() bool + HydrateRelationships func(views map[string]IEntityViewGenerator) + func NewEntityViewGenerator(version vx.V, data interface{}, opts ViewOptions) (IEntityViewGenerator, error) + type Options struct + func DefaultOptions(output string) *Options + func DefaultOptionsForApp(output string, pkg string, entityYamlFiles []string, usecaseYamlFiles []string) *Options + func (o *Options) DependencyPath() string + func (o *Options) DomainPath() string + func (o *Options) EntityIdType() string + func (o *Options) EntityPath() string + func (o *Options) InputsPath() string + func (o *Options) OutputsPath() string + func (o *Options) Package() string + func (o *Options) ProjectDir() string + func (o *Options) TestingPath() string + func (o *Options) UseCasesPath() string + type ProjectGenerator struct + func NewProjectGenerator(opts *Options) *ProjectGenerator + func (e *ProjectGenerator) GenerateDirs() error + type ViewOptions struct + AppPackage string + EntityPath string + ProjectDir string