cli

package
v0.0.0-...-083b4a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuditResultToDTO

func AuditResultToDTO(r *audit.Result) *schema.AuditDTO

AuditResultToDTO converts an audit.Result to a schema.AuditDTO for embedding in a JSON document.

func Execute

func Execute() int

Execute builds the root command, wires all subcommands, and runs it. Returns the process exit code.

func ExecuteWithDeps

func ExecuteWithDeps(deps *Deps, args []string) int

ExecuteWithDeps runs the CLI with the given deps and args. If args is nil, os.Args[1:] is used. Returns the process exit code.

func ExecuteWithDepsOutput

func ExecuteWithDepsOutput(deps *Deps, args []string, out io.Writer) int

ExecuteWithDepsOutput runs the CLI writing stdout to out. Useful in tests.

Types

type Deps

type Deps struct {
	Log       logging.Logger
	BuildInfo config.BuildInfo
	Providers *provider.Registry
	Exporters *exporter.Registry
}

Deps holds the application-level dependencies injected at startup.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL