Documentation ¶
Index ¶
- Constants
- func EnrichDatamodelBuilder(R *Runtime) func(R *runtime.Runtime, DM *datamodel.Datamodel) error
- func EnrichGeneratorBuilder(R *Runtime) func(R *runtime.Runtime, G *gen.Generator) error
- func Info(args []string, rflags flags.RootPflagpole, gflags flags.GenFlagpole, ...) error
- func InitModule(name string, rootflags flags.RootPflagpole, cmdflags flags.GenFlagpole) error
- func List(args []string, rflags flags.RootPflagpole, gflags flags.GenFlagpole) error
- func Run(args []string, rflags flags.RootPflagpole, gflags flags.GenFlagpole) error
- type AdhocTemplateConfig
- type Runtime
- func (R *Runtime) CleanupRemainingShadow() (errs []error)
- func (R *Runtime) Clear()
- func (R *Runtime) CreateAdhocGenerator() error
- func (R *Runtime) Initialize() error
- func (R *Runtime) PrintMergeConflicts()
- func (R *Runtime) PrintStats()
- func (R *Runtime) Reload(fast bool) (err error)
- func (R *Runtime) RunGenerator(G *gen.Generator) (errs []error)
- func (R *Runtime) RunGenerators() []error
- func (R *Runtime) ShadowDir() string
- func (R *Runtime) WriteOutput() []error
Constants ¶
View Source
const SHADOW_DIR = ".hof/shadow/"
Variables ¶
This section is empty.
Functions ¶
func EnrichDatamodelBuilder ¶
func EnrichGeneratorBuilder ¶
func Info ¶
func Info(args []string, rflags flags.RootPflagpole, gflags flags.GenFlagpole, iflags flags.Gen__InfoFlagpole) error
func InitModule ¶
func InitModule(name string, rootflags flags.RootPflagpole, cmdflags flags.GenFlagpole) error
func List ¶
func List(args []string, rflags flags.RootPflagpole, gflags flags.GenFlagpole) error
func Run ¶
func Run(args []string, rflags flags.RootPflagpole, gflags flags.GenFlagpole) error
Types ¶
type AdhocTemplateConfig ¶
type AdhocTemplateConfig struct { // Template filepath Filepath string // CUE path to input value within global value Cuepath string // CUE path to schema value within global value Schema string // Filepath to write results, possibly templated Outpath string // Is this a repeated template Repeated bool // Is this a data file? What type? DataFormat string }
parsed version of the --template flag semicolon separated: <filepath>:<?cuepath>@<schema>;[]<?outpath> each extra section is
func ParseTemplateFlag ¶
func ParseTemplateFlag(tf string) (cfg AdhocTemplateConfig, err error)
deconstructs the flag into struct semicolon separated: <filepath>:<?cuepath>@<schema>=<?outpath>
type Runtime ¶
type Runtime struct { *runtime.Runtime // Setup options GenFlags flags.GenFlagpole Diff3FlagSet bool // this is so we can set it to true without and explicit "true" }
gen.Runtime extends the common runtime.Runtime
func NewGenRuntime ¶
func NewGenRuntime(RT *runtime.Runtime, gflags flags.GenFlagpole) *Runtime
func (*Runtime) CleanupRemainingShadow ¶
func (*Runtime) CreateAdhocGenerator ¶
func (*Runtime) Initialize ¶
func (*Runtime) PrintMergeConflicts ¶
func (R *Runtime) PrintMergeConflicts()
func (*Runtime) PrintStats ¶
func (R *Runtime) PrintStats()
func (*Runtime) Reload ¶
Clears and reloads a runtime, rereading inputs and reprocessing everything fast determines if the CUE code is reloaded and evaluated or not (fast will skip CUE).
func (*Runtime) RunGenerators ¶
func (*Runtime) ShadowDir ¶
ShadowDir returns the absolute path to shadow dir for this runtime. It accounts for module root and relative directories.
func (*Runtime) WriteOutput ¶
Click to show internal directories.
Click to hide internal directories.