Documentation
¶
Index ¶
- type AggregationPoints
- type ArtifactPlan
- func BuildAppendMiddlewarePlan(existing *ExistingProject, project *ir.Project, opts Options, ...) (*ArtifactPlan, error)
- func BuildAppendModelPlan(existing *ExistingProject, project *ir.Project, opts Options, ...) (*ArtifactPlan, error)
- func BuildAppendServicePlan(existing *ExistingProject, project *ir.Project, opts Options, ...) (*ArtifactPlan, error)
- type ExistingModel
- type ExistingProject
- type ExistingProjectFeatures
- type ExistingService
- type ExtendOptions
- type ExtendResult
- func ApplyAppendMiddleware(templateFS fs.FS, root string, source *ir.Project, opts ExtendOptions, ...) (*ExtendResult, error)
- func ApplyAppendModel(templateFS fs.FS, root string, source *ir.Project, opts ExtendOptions, ...) (*ExtendResult, error)
- func ApplyAppendService(templateFS fs.FS, root string, source *ir.Project, opts ExtendOptions, ...) (*ExtendResult, error)
- type FileOwnership
- type Generator
- type Options
- type OwnershipTier
- type PlannedFile
- type PlannedUpdate
- type SvcRoute
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationPoints ¶ added in v1.4.0
type ArtifactPlan ¶ added in v1.4.0
type ArtifactPlan struct {
NewFiles []PlannedFile
UpdatedFiles []PlannedUpdate
ProtectedSkips []string
Warnings []string
}
func BuildAppendMiddlewarePlan ¶ added in v1.4.0
func BuildAppendMiddlewarePlan(existing *ExistingProject, project *ir.Project, opts Options, extend ExtendOptions) (*ArtifactPlan, error)
BuildAppendMiddlewarePlan validates an append-middleware request and reports which generated chain files would be refreshed.
func BuildAppendModelPlan ¶ added in v1.4.0
func BuildAppendModelPlan(existing *ExistingProject, project *ir.Project, opts Options, extend ExtendOptions) (*ArtifactPlan, error)
BuildAppendModelPlan validates an append-model request and reports the exact generated files that can be safely added or refreshed.
func BuildAppendServicePlan ¶ added in v1.4.0
func BuildAppendServicePlan(existing *ExistingProject, project *ir.Project, opts Options, extend ExtendOptions) (*ArtifactPlan, error)
BuildAppendServicePlan validates an append-service request and reports the exact files that a future extend apply phase would need to create or update.
type ExistingModel ¶ added in v1.4.0
type ExistingProject ¶ added in v1.4.0
type ExistingProject struct {
Root string
ModulePath string
IDLPath string
Services []ExistingService
Models []ExistingModel
AggregationPoints AggregationPoints
Ownership map[string]FileOwnership
Warnings []string
Features ExistingProjectFeatures
}
func ScanExistingProject ¶ added in v1.4.0
func ScanExistingProject(root string) (*ExistingProject, error)
ScanExistingProject inspects an existing target tree and classifies files according to the microgen ownership model used by future extend flows.
type ExistingProjectFeatures ¶ added in v1.4.0
type ExistingService ¶ added in v1.4.0
type ExtendOptions ¶ added in v1.4.0
type ExtendResult ¶ added in v1.4.0
type ExtendResult struct {
Plan *ArtifactPlan
}
func ApplyAppendMiddleware ¶ added in v1.4.0
func ApplyAppendMiddleware(templateFS fs.FS, root string, source *ir.Project, opts ExtendOptions, idlSourcePath string) (*ExtendResult, error)
ApplyAppendMiddleware refreshes generator-owned endpoint middleware seams for supported generated middleware names while preserving user custom chains.
func ApplyAppendModel ¶ added in v1.4.0
func ApplyAppendModel(templateFS fs.FS, root string, source *ir.Project, opts ExtendOptions, idlSourcePath string) (*ExtendResult, error)
ApplyAppendModel performs a safe append-model update against an existing generated project. The source contract must contain the full combined service/model contract so generator-owned wiring can be refreshed safely.
func ApplyAppendService ¶ added in v1.4.0
func ApplyAppendService(templateFS fs.FS, root string, source *ir.Project, opts ExtendOptions, idlSourcePath string) (*ExtendResult, error)
ApplyAppendService performs a safe append-service update against an existing generated project. The provided source project must contain the existing services plus the new service to append so generator-owned aggregation files can be regenerated deterministically.
type FileOwnership ¶ added in v1.4.0
type FileOwnership struct {
Path string
Tier OwnershipTier
Reason string
}
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator executes project generation from parsed definitions.
type Options ¶
type Options struct {
TemplateFS fs.FS
OutputDir string
ImportPath string
ServiceName string
Protocols []string
WithConfig bool
WithDocs bool
WithTests bool
WithModel bool
WithGRPC bool
WithDB bool
DBDriver string
WithSwag bool
WithSkill bool
IDLSrcPath string
RoutePrefix string
GeneratedMiddlewares []string
}
Options configures generation behavior.
type OwnershipTier ¶ added in v1.4.0
type OwnershipTier string
const ( OwnershipGeneratorRebuildable OwnershipTier = "generator_rebuildable" OwnershipGeneratorAggregation OwnershipTier = "generator_aggregation" OwnershipUserProtected OwnershipTier = "user_protected" )
type PlannedFile ¶ added in v1.4.0
type PlannedFile struct {
Path string
Ownership OwnershipTier
Reason string
}
type PlannedUpdate ¶ added in v1.4.0
type PlannedUpdate struct {
Path string
Ownership OwnershipTier
Reason string
}