binary

package
v0.0.0-...-b71eeb1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBinaryInfo

func GetBinaryInfo(image *input.ImageInfo, flagInfo *input.FlagInfo) error

GetBinaryInfo finds relevant binary information for the COS image

Types

type Differences

type Differences struct {
	Version            []string
	BuildID            []string
	Rootfs             string
	OSConfigs          map[string]string
	Stateful           string
	PartitionStructure string
	KernelConfigs      string
	KernelCommandLine  map[string]string
	SysctlSettings     string
}

Differences is a intermediate Struct used to store all binary differences Field names are pre-defined in parse_input.go and will be cross-checked with -binary flag.

func Diff

func Diff(image1, image2 *input.ImageInfo, flagInfo *input.FlagInfo) (*Differences, error)

Diff is a tool that finds all binary differences of two COS images (COS version, rootfs, kernel command line, stateful partition, ...) Input:

(*ImageInfo) image1 - A struct that will store binary info for image1
(*ImageInfo) image2 - A struct that will store binary info for image2
(*FlagInfo) flagInfo - A struct that holds input preference from the user

Output:

(*Differences) BinaryDiff - A struct that will store the binary differences

func (*Differences) FormatBuildIDDiff

func (d *Differences) FormatBuildIDDiff() string

FormatBuildIDDiff returns a formated string of the build difference

func (*Differences) FormatKernelCommandLineDiff

func (d *Differences) FormatKernelCommandLineDiff() string

FormatKernelCommandLineDiff returns a formated string of the KCL difference

func (*Differences) FormatKernelConfigsDiff

func (d *Differences) FormatKernelConfigsDiff() string

FormatKernelConfigsDiff returns a formated string of the kernel configs difference

func (*Differences) FormatOSConfigDiff

func (d *Differences) FormatOSConfigDiff() string

FormatOSConfigDiff returns a formated string of the OS Config difference

func (*Differences) FormatPartitionStructureDiff

func (d *Differences) FormatPartitionStructureDiff() string

FormatPartitionStructureDiff returns a formated string of the partition structure difference

func (*Differences) FormatRootfsDiff

func (d *Differences) FormatRootfsDiff() string

FormatRootfsDiff returns a formated string of the rootfs difference

func (*Differences) FormatStatefulDiff

func (d *Differences) FormatStatefulDiff() string

FormatStatefulDiff returns a formated string of the stateful partition difference

func (*Differences) FormatSysctlSettingsDiff

func (d *Differences) FormatSysctlSettingsDiff() string

FormatSysctlSettingsDiff returns a formated string of the Sysctrl settings difference

func (*Differences) FormatVersionDiff

func (d *Differences) FormatVersionDiff() string

FormatVersionDiff returns a formated string of the version difference

Jump to

Keyboard shortcuts

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