Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatamodelEnricher ¶ added in v0.6.8
type GeneratorEnricher ¶ added in v0.6.8
type Runtime ¶
type Runtime struct { sync.Mutex // original flags used to load the CUE Flags flags.RootPflagpole // Other important dirs when loading templates (auto set) WorkingDir string CueModuleRoot string RootToCwd string // module root -> working dir (foo/bar) CwdToRoot string // module root <- working dir (../..) // OutputDir string // where gen wants to write (tbd, other commands too) OriginalWkdir string // when we need to cd and then output back to this directory (create related, but could expand) // CUE related fields Entrypoints []string CueContext *cue.Context CueConfig *load.Config BuildInstances []*build.Instance CueErrors []error FieldOpts []cue.Option // The CUE value after all loading Value cue.Value // we need to rethink how we organize the code // in each of these packages so we can separate // the commands from the types and core logic Nodes []*hof.Node[any] Datamodels []*datamodel.Datamodel Generators []*gen.Generator Stats *RuntimeStats // contains filtered or unexported fields }
This is the hof Runtime that backs most commands
func New ¶ added in v0.6.8
func New(entrypoints []string, rflags flags.RootPflagpole) (*Runtime, error)
func (*Runtime) EnrichDatamodels ¶ added in v0.6.8
func (R *Runtime) EnrichDatamodels(datamodels []string, enrich DatamodelEnricher) error
func (*Runtime) EnrichGenerators ¶ added in v0.6.8
func (R *Runtime) EnrichGenerators(generators []string, enrich GeneratorEnricher) error
Click to show internal directories.
Click to hide internal directories.