diff

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePreview added in v0.2.0

func GeneratePreview(
	title string,
	outputFolder string,
	baseBranch *gitt.Branch,
	targetBranch *gitt.Branch,
	baseManifests []extract.ExtractedApp,
	targetManifests []extract.ExtractedApp,
	diffIgnoreRegex *string,
	lineCount uint,
	maxCharCount uint,
	hideDeletedAppDiff bool,
	statsInfo StatsInfo,
	selectionInfo SelectionInfo,
	argocdUIURL string,
	ignoreResourceRules []resource_filter.IgnoreResourceRule,
) (time.Duration, error)

GeneratePreview generates a diff using similarity-based matching instead of ID-based matching. This correctly handles cases where apps or resources are renamed.

func WriteNoAppsFoundMessage

func WriteNoAppsFoundMessage(
	title string,
	outputFolder string,
	selectors []app_selector.Selector,
	changedFiles []string,
	watchIfNoWatchPatternFound bool,
) error

WriteNoAppsFoundMessage writes a message to the output folder when no applications are found

Types

type AppSelectionInfo added in v0.1.20

type AppSelectionInfo struct {
	SkippedApplications    int
	SkippedApplicationSets int
}

type HTMLOutput added in v0.1.17

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

type HTMLSection added in v0.1.17

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

type MarkdownOutput added in v0.1.17

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

type MarkdownSection added in v0.1.17

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

type ResourceSection added in v0.2.0

type ResourceSection struct {
	Header    string // e.g. "Kind: Name (namespace)"
	Content   string // diff text with +/-/space prefixes
	IsSkipped bool   // true if resource matched an ignore rule
}

ResourceSection represents a single resource's diff within an app section. This is the pkg/diff view of matching.ResourceDiff, avoiding import cycles.

type SelectionInfo added in v0.1.20

type SelectionInfo struct {
	Base   AppSelectionInfo
	Target AppSelectionInfo
}

func ConvertArgoSelectionToSelectionInfo added in v0.1.20

func ConvertArgoSelectionToSelectionInfo(baseApps *argoapplication.ArgoSelection, targetApps *argoapplication.ArgoSelection) SelectionInfo

func (SelectionInfo) String added in v0.1.20

func (t SelectionInfo) String() string

type StatsInfo added in v0.1.20

type StatsInfo struct {
	FullDuration               time.Duration
	ExtractDuration            time.Duration
	ArgoCDInstallationDuration time.Duration
	ClusterCreationDuration    time.Duration
	ApplicationCount           int
}

func (StatsInfo) Stats added in v0.1.20

func (t StatsInfo) Stats() string

func (StatsInfo) String added in v0.1.20

func (t StatsInfo) String() string

Jump to

Keyboard shortcuts

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