Packages
Search packages... ⌘K
Go Package
modelscaffold
Model scaffolding — generate Go structs and YAML from protocol definitions
Go Ready MD
Scaffold Generation
$ sbx generate model --entity project --protocol entity
[scaffold] reading: .sbx/.framework/protocols/entity.yml
[scaffold] entity: project (12 attributes, 3 references)
[generate] pkg/models/project.go — struct + validation
[generate] pkg/models/project_test.go — table-driven tests
[generate] migrations/001_create_projects.up.sql
[generate] package.yml — model descriptor
[scaffold] 4 files generated
About
Generates Go struct definitions, YAML model files, and migration stubs from framework protocol definitions. Reads entity specifications and produces type-safe code that conforms to the modeling standard.
Public API
| Name | Kind | Signature |
|---|---|---|
| Scaffold | func | func Scaffold(spec ProtocolSpec, opts Options) (*Output, error) |
| Generator | type | type Generator struct |
| Template | type | type Template struct |
| Options | type | type Options struct |
Dependencies
Related Packages
codegen Go Ready
Code generation engine — template-based output for Go, SQL, and YAML targets
code-generationmulti-targettemplatespipeline
4 exports 2 deps
config Go Ready
YAML configuration reader — typed config loading with environment overlay
yamlconfigurationenvironmenttyped-config
4 exports 4 deps
Source
github.com/shredbx/sbx-core/pkg/modelscaffold
code-generationscaffoldingprotocolstemplates