Documentation
¶
Index ¶
- Constants
- Variables
- type CodeGenerator
- type EntityViewGeneratorV1
- 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
- type IEntityViewGenerator
- type 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
- type ViewOptions
Constants ¶
View Source
const ( TorpedoDir = ".torpedo" TorpedoEntitiesDir = "entities" TorpedoUseCasesDir = "use_cases" TorpedoDocsDir = "docs" DefaultDependencyDir = "/dependency" DefaultDomainPath = "/domain" DefaultEntityPath = "/domain/entities" DefaultUseCasesPath = "/domain/use_cases" DefaultTestingPath = "/domain/testing" DefaultInputsPath = "/domain/inputs" DefaultOutputsPath = "/domain/outputs" DefaultEntityId = vx.ULID )
Variables ¶
View Source
var ( // ErrInvalidEntityProvidedVersion the provided entity mismatch with the version ErrInvalidEntityProvidedVersion = errors.New("the provided entity mismatch with the version") // ErrEntityProvidedVersionNotSupported the provided version is not supported ErrEntityProvidedVersionNotSupported = errors.New("the provided version is not supported") // ErrKindNotSupported the provided kind is not supported ErrKindNotSupported = errors.New("the provided kind is not supported") )
Functions ¶
This section is empty.
Types ¶
type CodeGenerator ¶
type CodeGenerator struct {
// contains filtered or unexported fields
}
func NewCodeGenerator ¶
func NewCodeGenerator(opts *Options) *CodeGenerator
type EntityViewGeneratorV1 ¶
type EntityViewGeneratorV1 struct {
// contains filtered or unexported fields
}
func NewEntityViewGeneratorV1 ¶
func NewEntityViewGeneratorV1(entity v1.EntitySpec, opts ViewOptions) (*EntityViewGeneratorV1, error)
func (*EntityViewGeneratorV1) AddRelationshipField ¶
func (v *EntityViewGeneratorV1) AddRelationshipField(fieldId data.EntitySchemaItem)
func (*EntityViewGeneratorV1) EntityView ¶
func (v *EntityViewGeneratorV1) EntityView() *data.EntityView
func (*EntityViewGeneratorV1) GenerateEntityView ¶
func (v *EntityViewGeneratorV1) GenerateEntityView() (*data.EntityView, error)
func (*EntityViewGeneratorV1) HasRelationships ¶
func (v *EntityViewGeneratorV1) HasRelationships() bool
func (*EntityViewGeneratorV1) HydrateRelationships ¶
func (v *EntityViewGeneratorV1) HydrateRelationships(viewGenerators map[string]IEntityViewGenerator)
type IEntityViewGenerator ¶
type IEntityViewGenerator interface { GenerateEntityView() (*data.EntityView, error) HasRelationships() bool HydrateRelationships(views map[string]IEntityViewGenerator) EntityView() *data.EntityView AddRelationshipField(fieldId data.EntitySchemaItem) }
func NewEntityViewGenerator ¶
func NewEntityViewGenerator(version vx.V, data interface{}, opts ViewOptions) (IEntityViewGenerator, error)
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func DefaultOptions ¶
func DefaultOptionsForApp ¶
func (*Options) DependencyPath ¶
func (*Options) DomainPath ¶
func (*Options) EntityIdType ¶
func (*Options) EntityPath ¶
func (*Options) InputsPath ¶
func (*Options) OutputsPath ¶
func (*Options) ProjectDir ¶
func (*Options) TestingPath ¶
func (*Options) UseCasesPath ¶
type ProjectGenerator ¶
type ProjectGenerator struct {
// contains filtered or unexported fields
}
func NewProjectGenerator ¶
func NewProjectGenerator(opts *Options) *ProjectGenerator
func (*ProjectGenerator) GenerateDirs ¶
func (e *ProjectGenerator) GenerateDirs() error
type ViewOptions ¶
Click to show internal directories.
Click to hide internal directories.