cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: AGPL-3.0, AGPL-3.0-only Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute runs the root command. All exit paths call os.Exit explicitly.

func RunConfigBadges

func RunConfigBadges(appCfg *config.Config, rootDir string, names []string, status string) error

RunConfigBadges generates SVG badges from narrator config items. Extracted for reuse by both Cobra command and CI runners.

func RunDockerReadme

func RunDockerReadme(ctx context.Context, appCfg *config.Config, rootDir string, dryRun bool) error

RunDockerReadme syncs README content to container registries. Extracted for reuse by both Cobra command and CI runners.

func RunDocsGenerate

func RunDocsGenerate(rootCommand *cobra.Command, outputDir string) error

RunDocsGenerate generates reference documentation from the Cobra command tree. Extracted for reuse by both Cobra command and CI runners. Requires rootCmd for CLI reference generation — pass it explicitly.

func RunNarrator

func RunNarrator(appCfg *config.Config, rootDir string, dryRun bool, isVerbose bool) error

RunNarrator runs narrator items from config. Extracted for reuse by both Cobra command and CI runners.

func RunReleaseCreate added in v0.4.0

func RunReleaseCreate(req ReleaseCreateRequest) error

RunReleaseCreate executes the full release creation pipeline from an explicit request. All inputs are taken from req — no package-level vars are referenced.

func RunSecurityScan added in v0.4.0

func RunSecurityScan(req SecurityScanRequest) error

RunSecurityScan executes the full security scan pipeline from an explicit request. All inputs are taken from req — no package-level vars are referenced.

Types

type ExitError

type ExitError struct {
	Code int
	Err  error
}

ExitError wraps an error with a process exit code.

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type ReleaseCreateRequest added in v0.4.0

type ReleaseCreateRequest struct {
	Ctx             context.Context
	RootDir         string
	Config          *config.Config
	Tag             string
	Name            string
	NotesFile       string
	SecuritySummary string
	Draft           bool
	Prerelease      bool
	Assets          []string
	RegistryLinks   bool
	CatalogLinks    bool
	SkipSync        bool
	Verbose         bool
	Writer          io.Writer
}

ReleaseCreateRequest is the explicit input contract for RunReleaseCreate. Cobra command fills this from flags; CI runner fills it from config/ciCtx. Ctx is inside the request (matches docker.Request pattern).

type SecurityScanRequest added in v0.4.0

type SecurityScanRequest struct {
	Ctx            context.Context
	RootDir        string
	Config         *config.Config
	Image          string // explicit image ref; empty = auto-resolve from manifest
	OutputDir      string // empty = from Config.Security.OutputDir
	SBOM           bool
	FailOnCritical bool
	Skip           bool
	Detail         string // none|counts|detailed|full; empty = from config
	Strict         bool
	Verbose        bool
	Writer         io.Writer
}

SecurityScanRequest is the explicit input contract for RunSecurityScan. Cobra command fills this from flags; CI runner fills it from config/ciCtx. Ctx is inside the request (matches docker.Request pattern).

type SilentExitError added in v0.4.0

type SilentExitError struct {
	Code int
}

SilentExitError signals a non-zero exit without printing anything. Used when the error has already been rendered (e.g. summary + Exit Reason).

func (*SilentExitError) Error added in v0.4.0

func (e *SilentExitError) Error() string

Jump to

Keyboard shortcuts

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