cmd

package
v0.0.0-...-17fac62 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSilent = errors.New("SILENT")
View Source
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.

View Source
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

func NewRootCmd() *cobra.Command

NewRootCmd creates and returns the root cobra command. It is useful for producing copies of rootCmd for testing.

func ParseFmtString

func ParseFmtString(in string) (asConf.Format, error)

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

type DiffOptions struct {
	Verbose        bool
	FilterSections map[string]struct{}
}

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.

Jump to

Keyboard shortcuts

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