Documentation
¶
Overview ¶
Package app contains shared orchestration used by the Astrix CLI and daemon.
Index ¶
- func CurrentDiff(ctx context.Context, root string) (string, error)
- func DetectLanguages(dir string) []string
- func Impact(root, diff string) (astgraph.ImpactSet, []ingress.FileChange, error)
- func InitProject(dir string, force bool, stdout io.Writer) error
- func PolicyGate(path string) (*policy.Gate, error)
- func ResolveProjectProfile(root, astrixfile string) (runner.ProjectProfile, error)
- func RunTests(ctx context.Context, root string, impact astgraph.ImpactSet) error
- func ValidateAstrixfile(path string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentDiff ¶
CurrentDiff returns the staged and unstaged unified diff against HEAD.
func DetectLanguages ¶
DetectLanguages scans one project directory for ecosystem markers and returns the detected languages in a fixed, deterministic priority order.
func InitProject ¶
InitProject generates a starter Astrixfile.ax in dir based on the languages and sandbox profile detected for the repository. An existing Astrixfile.ax is never overwritten unless force is set. The generated policy is validated with the real AxLang parser and semantic checker, then written in canonical formatter output, and a short confirmation is printed to stdout.
func PolicyGate ¶
PolicyGate loads and compiles an Astrixfile into an embedded OPA gate.
func ResolveProjectProfile ¶
func ResolveProjectProfile(root, astrixfile string) (runner.ProjectProfile, error)
ResolveProjectProfile applies environment overrides, then .ax stage values, then manifest-based project defaults.
func RunTests ¶
RunTests runs either all Go tests or the packages containing the selected test nodes.
func ValidateAstrixfile ¶
ValidateAstrixfile parses, checks and compiles the configured policy module.
Types ¶
This section is empty.