packagediff

package
v0.0.0-...-4aaa17f Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Differences

type Differences struct {
	PackageDiff []PkgDiff // If two images are passed in, this is a slice of all package differences
	PackageList []Package // If only one image is passed in, return full package list
}

Differences is an intermediate struct used to store package lists and differences

func Diff

func Diff(packagesImage1, packagesImage2 []Package, flagInfo *input.FlagInfo) (*Differences, error)

Diff is a tool that finds all package differences of two COS images (Category, Name, Version, Revision) Input:

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

Output:

(*Differences) packageDiff - A struct that will store the package differences

func (*Differences) FormatPackageListDiff

func (d *Differences) FormatPackageListDiff(image1, image2 string) string

FormatPackageListDiff returns a formated string of the package list difference

(string) image1 - Temp directory name of image1
(string) image2 - Temp directory name of image2

type InstalledPackages

type InstalledPackages struct {
	InstalledPackages []Package
}

InstalledPackages is used to store an image’s full package list parsed from the package list json file

type Package

type Package struct {
	Category string
	Name     string
	Version  string
	Revision string
}

Package is used to store individual package data parsed from the package list json file

func GetPackageInfo

func GetPackageInfo(image *input.ImageInfo, flagInfo *input.FlagInfo) ([]Package, error)

GetPackageInfo finds relevant package list information for the COS image

type PkgDiff

type PkgDiff struct {
	// contains filtered or unexported fields
}

PkgDiff is used to hold package difference between the two images

Jump to

Keyboard shortcuts

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