Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSilent = errors.New("SILENT")
var LoggingEnum = map[string]bool{ "critical": true, "warning": true, "info": true, "debug": true, "detail": true, }
LoggingEnum is a map of valid logging levels - collated from schema.
var (
VERSION = "development" // Replaced at compile time
)
Functions ¶
func Execute ¶
func Execute() error
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func InitializeGlobals ¶
func InitializeGlobals() error
InitializeGlobals initializes global loggers and schema.
func NewRootCmd ¶
NewRootCmd creates and returns the root cobra command. It is useful for producing copies of rootCmd for testing.
Types ¶
type ChangeSummary ¶
type ChangeSummary struct {
Sections map[string]SectionChanges
AvailableSections []string
TotalChanges int
TotalAdditions int
TotalRemovals int
TotalModified int
LowerVersion string
UpperVersion string
}
ChangeSummary groups changes by section and type.
type ChangeTarget ¶
type ChangeTarget int
ChangeTarget represents what type of element is being changed.
const ( Property ChangeTarget = iota ArrayItem )
type ChangeType ¶
type ChangeType string
ChangeType represents the type of change operation.
const ( Addition ChangeType = "add" Removal ChangeType = "remove" Modification ChangeType = "replace" )
type DiffOptions ¶
DiffOptions stores display configuration options.
type SchemaChange ¶
type SchemaChange struct {
Path string
Type ChangeType
OldValue any
Value any
OldFullValue any
NewFullValue any
}
SchemaChange represents a single schema change.
type SectionChanges ¶
type SectionChanges struct {
Additions []SchemaChange
Removals []SchemaChange
Modifications []SchemaChange
}
SectionChanges groups changes by operation type.