Documentation ¶
Index ¶
- type ChatEnricher
- type DatamodelEnricher
- type FlowEnricher
- type GeneratorEnricher
- type Runtime
- func (R *Runtime) EnrichChats(chats []string, enrich ChatEnricher) error
- func (R *Runtime) EnrichDatamodels(datamodels []string, enrich DatamodelEnricher) error
- func (R *Runtime) EnrichFlows(flows []string, enrich FlowEnricher) error
- func (R *Runtime) EnrichGenerators(generators []string, enrich GeneratorEnricher) error
- func (R *Runtime) GetLoadedFiles() []string
- func (R *Runtime) Load() (err error)
- func (R *Runtime) LoadOrphanedFile(f *build.File, pkgName string, root, dir string, index, total int) (F *ast.File, err error)
- func (R *Runtime) OutputDir(dir string) string
- type RuntimeStats
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 FieldOpts []cue.Option // this is a bit hacky, but we use this with vet to validate data (and probably st as well) DontPlaceOrphanedFiles bool // 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] Chats []*chat.Chat Datamodels []*datamodel.Datamodel Generators []*gen.Generator Workflows []*flow.Flow 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) EnrichChats ¶ added in v0.6.8
func (R *Runtime) EnrichChats(chats []string, enrich ChatEnricher) error
func (*Runtime) EnrichDatamodels ¶ added in v0.6.8
func (R *Runtime) EnrichDatamodels(datamodels []string, enrich DatamodelEnricher) error
func (*Runtime) EnrichFlows ¶ added in v0.6.9
func (R *Runtime) EnrichFlows(flows []string, enrich FlowEnricher) error
func (*Runtime) EnrichGenerators ¶ added in v0.6.8
func (R *Runtime) EnrichGenerators(generators []string, enrich GeneratorEnricher) error
func (*Runtime) GetLoadedFiles ¶ added in v0.6.9
func (*Runtime) LoadOrphanedFile ¶ added in v0.6.9
type RuntimeStats ¶ added in v0.6.8
func (RuntimeStats) String ¶ added in v0.6.8
func (S RuntimeStats) String() string
Click to show internal directories.
Click to hide internal directories.