cmd

package
v0.0.93 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: GPL-3.0 Imports: 31 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// DefaultConfigFileName is the default name for the breaking rules config file
	DefaultConfigFileName = "changes-rules.yaml"
)

Variables

View Source
var (
	Version string
	Commit  string
	Date    string
)

Functions

func ApplyBreakingRulesConfig added in v0.0.91

func ApplyBreakingRulesConfig(config *model.BreakingRulesConfig)

ApplyBreakingRulesConfig sets the active breaking rules config in libopenapi. If config is nil, uses libopenapi defaults. The config is merged on top of defaults, so only specified rules are overridden.

func BuildLabeledTreeMapNode added in v0.0.91

func BuildLabeledTreeMapNode(list *[]pterm.LeveledListItem, field reflect.Value, level int, label string, markdown bool)

BuildLabeledTreeMapNode builds tree nodes for a map field with an optional label. If label is non-empty, it adds the label as a parent node before the map entries.

func BuildParameterSliceTreeNode added in v0.0.91

func BuildParameterSliceTreeNode(list *[]pterm.LeveledListItem, field reflect.Value, level int, label string, markdown bool)

BuildParameterSliceTreeNode builds tree nodes for parameter changes, adding the parameter name as a label. It also includes any pending parameter addition/removal changes from PropertyChanges.

func BuildSliceTreeNode

func BuildSliceTreeNode[T any](list *[]pterm.LeveledListItem, field reflect.Value, level int, label string, markdown bool)

func BuildTreeMapNode

func BuildTreeMapNode(list *[]pterm.LeveledListItem, field reflect.Value, level int, markdown bool)

func DigIntoObject

func DigIntoObject[T any](list *[]pterm.LeveledListItem, field reflect.Value, level int, label string, markdown bool)

func Execute

func Execute(version, commit, date string)

func ExtractGithubDetailsFromURL

func ExtractGithubDetailsFromURL(url *url.URL) (string, string, string, error)

func FlattenHistoricalReport added in v0.0.54

func FlattenHistoricalReport(report *model.HistoricalReport) *model.FlatHistoricalReport

func FlattenReport added in v0.0.54

func FlattenReport(report *model.Report) *model.FlatReport

func GetConsoleCommand

func GetConsoleCommand() *cobra.Command

func GetHTMLReportCommand

func GetHTMLReportCommand() *cobra.Command

func GetMarkdownReportCommand added in v0.0.84

func GetMarkdownReportCommand() *cobra.Command

func GetReportCommand

func GetReportCommand() *cobra.Command

func GetSummaryCommand

func GetSummaryCommand() *cobra.Command

func LoadBreakingRulesConfig added in v0.0.91

func LoadBreakingRulesConfig(configPath string) (*model.BreakingRulesConfig, error)

LoadBreakingRulesConfig loads a breaking rules configuration from the specified path. If configPath is empty, it searches default locations (current directory, then ~/.config). Returns nil config if no config is found in default locations (uses libopenapi defaults). Returns error if user-specified config path doesn't exist or has invalid YAML.

func PrintBanner

func PrintBanner()

func PrintConfigError added in v0.0.91

func PrintConfigError(err error)

PrintConfigError prints a config error with nice formatting using pterm. Displays in red with spacing above and below.

func PrintHowToUse

func PrintHowToUse(command string)

func ResetBreakingRulesConfig added in v0.0.91

func ResetBreakingRulesConfig()

ResetBreakingRulesConfig resets the active breaking rules to libopenapi defaults.

func RunGitHistoryHTMLReport

func RunGitHistoryHTMLReport(gitPath, filePath, baseCommit string, latest, useCDN bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, base string, remote, extRefs bool, globalRevisions bool, limit int, limitTime int,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []*model.Report, []error)

func RunGitHistoryMarkdownReport added in v0.0.84

func RunGitHistoryMarkdownReport(gitPath, filePath, baseCommit string, latest, useCDN bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, base string, remote, extRefs bool, globalRevisions bool, limit int, limitTime int,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []*model.Report, []error)

func RunGithubHistoryHTMLReport

func RunGithubHistoryHTMLReport(username, repo, filePath, baseCommit string, latest, useCDN, embeddedMode bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, limit int, limitTime int, base string, remote, extRefs bool,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []*model.Report, []error)

func RunGithubHistoryMarkdownReport added in v0.0.84

func RunGithubHistoryMarkdownReport(username, repo, filePath, baseCommit string, latest, useCDN, embeddedMode bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, limit int, limitTime int, base string, remote, extRefs bool,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []*model.Report, []error)

func RunLeftRightHTMLReport

func RunLeftRightHTMLReport(left, right string, useCDN bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, base string, remote, extRefs bool,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []error)

func RunLeftRightHTMLReportViaString

func RunLeftRightHTMLReportViaString(left, right string, useCDN, embedded bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, base string, remote, extRefs bool,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []error)

func RunLeftRightMarkDownReport added in v0.0.84

func RunLeftRightMarkDownReport(left, right string, useCDN bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, base string, remote, extRefs bool,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []error)

func RunLeftRightMarkDownReportViaString added in v0.0.84

func RunLeftRightMarkDownReportViaString(left, right string, useCDN, embedded bool,
	progressChan chan *model.ProgressUpdate, errorChan chan model.ProgressError, base string, remote, extRefs bool,
	breakingConfig *whatChangedModel.BreakingRulesConfig,
) ([]byte, []error)

Types

type ConfigParseError added in v0.0.91

type ConfigParseError struct {
	FilePath string
	Err      error
}

ConfigParseError represents a YAML parsing error with context

func (*ConfigParseError) Error added in v0.0.91

func (e *ConfigParseError) Error() string

func (*ConfigParseError) Unwrap added in v0.0.91

func (e *ConfigParseError) Unwrap() error

type ConfigValidationError added in v0.0.91

type ConfigValidationError struct {
	FilePath string
	Result   *model.ConfigValidationResult
}

ConfigValidationError represents validation errors in the config structure

func (*ConfigValidationError) Error added in v0.0.91

func (e *ConfigValidationError) Error() string

Jump to

Keyboard shortcuts

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