Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountByType ¶
func CountByType(changes []Change, changeType ChangeType) int
CountByType counts changes by type
func FormatLocation ¶
FormatLocation formats a location string for display
func GetMigrationTip ¶
func GetMigrationTip(changeType ChangeType, location string) string
GetMigrationTip provides a migration tip based on change type
Types ¶
type Change ¶
type Change struct {
Type ChangeType `json:"type"`
Severity Severity `json:"severity"`
Location string `json:"location"`
OldValue string `json:"old_value,omitempty"`
NewValue string `json:"new_value,omitempty"`
Description string `json:"description"`
MigrationTip string `json:"migration_tip,omitempty"`
}
Change represents a single change between two versions
func FilterBySeverity ¶
FilterBySeverity filters changes by severity
type ChangeType ¶
type ChangeType string
ChangeType represents the type of change detected
const ( FieldAdded ChangeType = "field_added" FieldRemoved ChangeType = "field_removed" FieldRenamed ChangeType = "field_renamed" TypeChanged ChangeType = "type_changed" MessageAdded ChangeType = "message_added" MessageRemoved ChangeType = "message_removed" EnumAdded ChangeType = "enum_added" EnumRemoved ChangeType = "enum_removed" EnumValueAdded ChangeType = "enum_value_added" EnumValueRemoved ChangeType = "enum_value_removed" ServiceAdded ChangeType = "service_added" ServiceRemoved ChangeType = "service_removed" MethodAdded ChangeType = "method_added" MethodRemoved ChangeType = "method_removed" FieldNumberChanged ChangeType = "field_number_changed" LabelChanged ChangeType = "label_changed" )
type DiffResult ¶
type DiffResult struct {
FromVersion string `json:"from_version"`
ToVersion string `json:"to_version"`
Changes []Change `json:"changes"`
}
DiffResult contains all changes detected between two versions
type Severity ¶
type Severity string
Severity represents the severity level of a change
func GetSeverity ¶
func GetSeverity(changeType ChangeType) Severity
GetSeverity determines the severity of a change based on its type
Click to show internal directories.
Click to hide internal directories.