Documentation
¶
Index ¶
Constants ¶
const ( CategoryFrontend = "frontend" CategoryStyling = "styling" CategoryHTTP = "http" CategoryDatabase = "database" CategoryAuth = "auth" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feature ¶
type Feature struct {
ID string
CategoryID string
Name string
Description string
Templates []Template
Directories []string
Tags []string
}
Feature enumerates a single modular capability that can be composed together.
func FeatureByID ¶
FeatureByID returns the feature for the given identifier.
func FeaturesForCategory ¶
FeaturesForCategory lists features for the supplied category ordered by name.
type FeatureCategory ¶
type FeatureCategory struct {
ID string
Name string
Description string
Required bool
AllowMultiple bool
}
FeatureCategory represents a group of compatible modular features.
func Categories ¶
func Categories() []FeatureCategory
Categories returns a copy of the registered feature categories ordered for display.
type Selection ¶
Selection captures the chosen feature identifiers per category.
func CloneSelection ¶
CloneSelection returns a deep copy of the provided selection to avoid mutation.
func DefaultSelection ¶
func DefaultSelection() Selection
DefaultSelection returns a copy of the default feature selection.
func MergeSelections ¶
MergeSelections merges b into a, overriding category selections present in b.
func SelectionFromIDs ¶
SelectionFromIDs normalizes per-category input ensuring each value is tracked as a slice.
type Stack ¶
type Stack struct {
ID string
Name string
Description string
Templates []Template
Directories []string
Tags []string
Features []Feature
}
Stack describes the composed project blueprint built from modular features.
func (Stack) HasFeature ¶
HasFeature reports whether the stack includes the feature with the provided ID.
type Template ¶
type Template struct {
// Source is the path inside internal/templates that should be rendered.
Source string
// Destination is the relative path to write within the generated project.
Destination string
// Mode controls the filesystem permissions for the generated file.
Mode fsFileMode
}
Template describes a templated file sourced from the embedded filesystem.