Documentation
¶
Overview ¶
Package astconfig reads gothic.config.go via go/parser (no type checker) and produces the same cli.Config struct that v2 loaded from gothic-config.json.
The parser only understands static composite literals: string literals, integer literals, nested struct literals, map literals, and the three ENV builder calls (gothic.Env, gothic.SSMParam, gothic.SecretsManager). Any unrecognized top-level field or non-literal expression (e.g. os.Getenv(...)) is silently ignored. The only hard error is an unknown ENV builder function.
GoModName is NOT read from gothic.config.go; it is read from go.mod in projectRoot via golang.org/x/mod/modfile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOrchestrator ¶
func GenerateOrchestrator(projectRoot, hookName string, gctx *config.GothicContext) (*config.GothicContext, error)
GenerateOrchestrator compiles and runs the user's lifecycle hook (hookName, e.g. "BeforeDeploy" or "AfterDeploy") from gothic.config.go in an isolated temporary module, passing the GothicContext as JSON over the GOTHIC_CONTEXT env var and reading back the (possibly mutated) context from stdout.
The temporary module imports the user's config file as package "gothicorchestrator" and links it against the gothicframework module via a replace directive pointing at the framework module root on disk (resolved by findFrameworkRoot).
Types ¶
This section is empty.