goengine

package
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 GoEngine

type GoEngine struct {
	// contains filtered or unexported fields
}

func New

func New(opts *Options) *GoEngine

func (*GoEngine) Fire

func (e *GoEngine) Fire() []error

func (*GoEngine) Init

func (e *GoEngine) Init() error

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 DefaultOptions(output string) *Options

func DefaultOptionsForApp

func DefaultOptionsForApp(output string, pkg string, entityYamlFiles []string, usecaseYamlFiles []string) *Options

func (*Options) DependencyPath

func (o *Options) DependencyPath() string

func (*Options) DomainPath

func (o *Options) DomainPath() string

func (*Options) EntityIdType

func (o *Options) EntityIdType() string

func (*Options) EntityPath

func (o *Options) EntityPath() string

func (*Options) InputsPath

func (o *Options) InputsPath() string

func (*Options) OutputsPath

func (o *Options) OutputsPath() string

func (*Options) Package

func (o *Options) Package() string

func (*Options) ProjectDir

func (o *Options) ProjectDir() string

func (*Options) TestingPath

func (o *Options) TestingPath() string

func (*Options) UseCasesPath

func (o *Options) UseCasesPath() string

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

type ViewOptions struct {
	AppPackage string
	EntityPath string
	ProjectDir string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL