commands

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package commands provides all CLI command implementations for Shadowforge

Package commands provides CLI command implementations for Shadowforge

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnalyzeCommands

func NewAnalyzeCommands(handlers *CLIHandlers, logger *logrus.Logger) ([]*cobra.Command, error)

NewAnalyzeCommands creates all analyze-related commands

func NewArchiveCommands

func NewArchiveCommands(logger *logrus.Logger) ([]*cobra.Command, error)

NewArchiveCommands creates all archive-related commands

func NewChainCommand

func NewChainCommand(
	createHandler *commands.CreateChainHandler,
	executeHandler *commands.ExecuteChainHandler,
	reverseHandler *commands.ReverseChainHandler,
) *cobra.Command

NewChainCommand creates the chain command tree

func NewEmbedCommands

func NewEmbedCommands(handlers *CLIHandlers, logger *logrus.Logger) ([]*cobra.Command, error)

NewEmbedCommands creates all embed-related commands

func NewExtractCommands

func NewExtractCommands(handlers *CLIHandlers, logger *logrus.Logger) ([]*cobra.Command, error)

NewExtractCommands creates all extract-related commands

func NewSelectionCommands

func NewSelectionCommands(handlers *CLIHandlers) ([]*cobra.Command, error)

NewSelectionCommands creates all selection-related commands.

func NewUtilityCommands

func NewUtilityCommands(logger *logrus.Logger) ([]*cobra.Command, error)

NewUtilityCommands creates all utility commands

func NewWatermarkCommands

func NewWatermarkCommands(watermarkService *watermark.WatermarkService, log *logrus.Logger) ([]*cobra.Command, error)

NewWatermarkCommands creates the watermark command group

Types

type CLIHandlers

type CLIHandlers struct {
	// contains filtered or unexported fields
}

CLI command handlers - these will be injected with actual service dependencies

func NewCLIHandlers

func NewCLIHandlers(
	embedHandler *commands.EmbedHandler,
	extractHandler *commands.ExtractHandler,
	analyzeCapacityHandler *commands.AnalyzeCapacityHandler,
	scanHandler *commands.ScanDirectoryHandler,
	selectHandler *commands.SelectCoversHandler,
	suggestHandler *commands.GenerateSuggestionsHandler,
	logger *logrus.Logger,
) *CLIHandlers

NewCLIHandlers creates CLI command handlers with service dependencies. Accepts pre-initialized handlers from the service container.

type MediaFileInfo

type MediaFileInfo struct {
	Path                 string               `json:"path"`
	Name                 string               `json:"name"`
	Size                 int64                `json:"size"`
	MediaType            string               `json:"media_type"`
	Extension            string               `json:"extension"`
	RecommendedTechnique stego.StegoTechnique `json:"recommended_technique"`
	MaxCapacity          int64                `json:"max_capacity"`
	SafeCapacity         int64                `json:"safe_capacity"`
	QualityScore         float64              `json:"quality_score"`
	StealthScore         float64              `json:"stealth_score"`
}

MediaFileInfo holds information about a scanned media file

type ScanDirectoryResult

type ScanDirectoryResult struct {
	Directory         string          `json:"directory"`
	TotalFiles        int             `json:"total_files"`
	CompatibleFiles   []MediaFileInfo `json:"compatible_files"`
	SkippedFiles      []string        `json:"skipped_files"`
	TotalCapacity     int64           `json:"total_capacity"`
	SafeTotalCapacity int64           `json:"safe_total_capacity"`
	ScanTime          time.Duration   `json:"scan_time_ms"`
}

ScanDirectoryResult holds the complete directory scan results

type TechniqueScore

type TechniqueScore struct {
	Technique     stego.StegoTechnique
	CapacityScore float64 // 0-100: higher = more capacity
	StealthScore  float64 // 0-100: higher = more stealthy/obfuscated
	CombinedScore float64 // Weighted combination
	Reason        string
}

TechniqueScore represents the suitability of a technique for a given file.

Jump to

Keyboard shortcuts

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