util

package
Version: v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const FSDiffOutput = `` /* 528-byte string literal not displayed */
View Source
const FSLayerDiffOutput = `` /* 601-byte string literal not displayed */
View Source
const FileAnalysisOutput = `` /* 158-byte string literal not displayed */
View Source
const FileLayerAnalysisOutput = `` /* 225-byte string literal not displayed */
View Source
const FilenameDiffOutput = `
-----Diff of {{.Filename}}-----
{{.Description}}

{{.Diff}}
`
View Source
const HistoryDiffOutput = `` /* 372-byte string literal not displayed */
View Source
const ListAnalysisOutput = `` /* 176-byte string literal not displayed */
View Source
const MetadataDiffOutput = `` /* 365-byte string literal not displayed */
View Source
const MultiVersionDiffOutput = `` /* 673-byte string literal not displayed */
View Source
const MultiVersionPackageOutput = `` /* 220-byte string literal not displayed */
View Source
const SingleVersionDiffOutput = `` /* 651-byte string literal not displayed */
View Source
const SingleVersionPackageOutput = `` /* 197-byte string literal not displayed */

Variables

View Source
var SortSize bool

Functions

func BuildLayerTargets

func BuildLayerTargets(path, target string) ([]string, error)

BuildLayerTargets creates a string slice of the layers found at path with the target concatenated.

func GetAddedEntries

func GetAddedEntries(d1, d2 pkgutil.Directory) []string

func GetAdditions

func GetAdditions(a, b []string) []string

Modification of difflib's unified differ

func GetDeletedEntries

func GetDeletedEntries(d1, d2 pkgutil.Directory) []string

func GetDeletions

func GetDeletions(a, b []string) []string

func GetMatches

func GetMatches(a, b []string) []string

func GetModifiedEntries

func GetModifiedEntries(d1, d2 pkgutil.Directory) []string

Checks for content differences between files of the same name from different directories

func JSONify

func JSONify(diff interface{}) error

func TemplateOutput

func TemplateOutput(diff interface{}, templateType string) error

func TemplateOutputFromFormat added in v0.7.0

func TemplateOutputFromFormat(diff interface{}, templateType string, format string) error

Types

type AnalyzeResult

type AnalyzeResult struct {
	Image       string
	AnalyzeType string
	Analysis    interface{}
}

type DiffResult

type DiffResult struct {
	Image1   string
	Image2   string
	DiffType string
	Diff     interface{}
}

type DirDiff

type DirDiff struct {
	Adds []pkgutil.DirectoryEntry
	Dels []pkgutil.DirectoryEntry
	Mods []EntryDiff
}

func DiffDirectory

func DiffDirectory(d1, d2 pkgutil.Directory) (DirDiff, bool)

DiffDirectory takes the diff of two directories, assuming both are completely unpacked

type DirDiffResult

type DirDiffResult DiffResult

func (DirDiffResult) OutputStruct

func (r DirDiffResult) OutputStruct() interface{}

func (DirDiffResult) OutputText

func (r DirDiffResult) OutputText(diffType string, format string) error

type EntryDiff

type EntryDiff struct {
	Name  string
	Size1 int64
	Size2 int64
}

type FileAnalyzeResult

type FileAnalyzeResult AnalyzeResult

func (FileAnalyzeResult) OutputStruct

func (r FileAnalyzeResult) OutputStruct() interface{}

func (FileAnalyzeResult) OutputText

func (r FileAnalyzeResult) OutputText(analyzeType string, format string) error

type FileLayerAnalyzeResult added in v0.10.0

type FileLayerAnalyzeResult AnalyzeResult

func (FileLayerAnalyzeResult) OutputStruct added in v0.10.0

func (r FileLayerAnalyzeResult) OutputStruct() interface{}

func (FileLayerAnalyzeResult) OutputText added in v0.10.0

func (r FileLayerAnalyzeResult) OutputText(analyzeType string, format string) error

type FileNameDiff added in v0.5.1

type FileNameDiff struct {
	Filename    string
	Description string
	Diff        string
}

func DiffFile added in v0.5.1

func DiffFile(image1, image2 *pkgutil.Image, filename string) (*FileNameDiff, error)

type HistDiffResult

type HistDiffResult DiffResult

func (HistDiffResult) OutputStruct

func (r HistDiffResult) OutputStruct() interface{}

func (HistDiffResult) OutputText

func (r HistDiffResult) OutputText(diffType string, format string) error

type Info

type Info struct {
	Package string
	Info1   PackageInfo
	Info2   PackageInfo
}

Info stores the information for one package in two different images.

type ListAnalyzeResult

type ListAnalyzeResult AnalyzeResult

func (ListAnalyzeResult) OutputStruct

func (r ListAnalyzeResult) OutputStruct() interface{}

func (ListAnalyzeResult) OutputText

func (r ListAnalyzeResult) OutputText(resultType string, format string) error

type MetadataDiffResult added in v0.9.0

type MetadataDiffResult DiffResult

func (MetadataDiffResult) OutputStruct added in v0.9.0

func (r MetadataDiffResult) OutputStruct() interface{}

func (MetadataDiffResult) OutputText added in v0.9.0

func (r MetadataDiffResult) OutputText(diffType string, format string) error

type MultiVersionInfo

type MultiVersionInfo struct {
	Package string
	Info1   []PackageInfo
	Info2   []PackageInfo
}

MultiVersionInfo stores the information for one multi-version package in two different images.

type MultiVersionPackageAnalyzeResult

type MultiVersionPackageAnalyzeResult AnalyzeResult

func (MultiVersionPackageAnalyzeResult) OutputStruct

func (r MultiVersionPackageAnalyzeResult) OutputStruct() interface{}

func (MultiVersionPackageAnalyzeResult) OutputText

func (r MultiVersionPackageAnalyzeResult) OutputText(resultType string, format string) error

type MultiVersionPackageDiff

type MultiVersionPackageDiff struct {
	Packages1 map[string]map[string]PackageInfo
	Packages2 map[string]map[string]PackageInfo
	InfoDiff  []MultiVersionInfo
}

MultiVersionPackageDiff stores the difference information between two images which could have multi-version packages.

func GetMultiVersionMapDiff

func GetMultiVersionMapDiff(map1, map2 map[string]map[string]PackageInfo) MultiVersionPackageDiff

GetMultiVersionMapDiff determines the differences between two image package maps with multi-version packages This getter supports multi version packages.

type MultiVersionPackageDiffResult

type MultiVersionPackageDiffResult DiffResult

func (MultiVersionPackageDiffResult) OutputStruct

func (r MultiVersionPackageDiffResult) OutputStruct() interface{}

func (MultiVersionPackageDiffResult) OutputText

func (r MultiVersionPackageDiffResult) OutputText(diffType string, format string) error

type MultipleDirDiff added in v0.10.0

type MultipleDirDiff struct {
	DirDiffs []DirDiff
}

type MultipleDirDiffResult added in v0.10.0

type MultipleDirDiffResult DiffResult

func (MultipleDirDiffResult) OutputStruct added in v0.10.0

func (r MultipleDirDiffResult) OutputStruct() interface{}

func (MultipleDirDiffResult) OutputText added in v0.10.0

func (r MultipleDirDiffResult) OutputText(diffType string, format string) error

type PackageDiff

type PackageDiff struct {
	Packages1 map[string]PackageInfo
	Packages2 map[string]PackageInfo
	InfoDiff  []Info
}

PackageDiff stores the difference information between two images.

func GetMapDiff

func GetMapDiff(map1, map2 map[string]PackageInfo) PackageDiff

GetMapDiff determines the differences between maps of package names to PackageInfo structs This getter supports only single version packages.

type PackageInfo

type PackageInfo struct {
	Version string
	Size    int64
}

PackageInfo stores the specific metadata about a package.

type PackageOutput

type PackageOutput struct {
	Name    string
	Path    string `json:",omitempty"`
	Version string
	Size    int64
}

type Result

type Result interface {
	OutputStruct() interface{}
	OutputText(resultType string, format string) error
}

type SingleVersionPackageAnalyzeResult

type SingleVersionPackageAnalyzeResult AnalyzeResult

func (SingleVersionPackageAnalyzeResult) OutputStruct

func (r SingleVersionPackageAnalyzeResult) OutputStruct() interface{}

func (SingleVersionPackageAnalyzeResult) OutputText

func (r SingleVersionPackageAnalyzeResult) OutputText(diffType string, format string) error

type SingleVersionPackageDiffResult

type SingleVersionPackageDiffResult DiffResult

func (SingleVersionPackageDiffResult) OutputStruct

func (r SingleVersionPackageDiffResult) OutputStruct() interface{}

func (SingleVersionPackageDiffResult) OutputText

func (r SingleVersionPackageDiffResult) OutputText(diffType string, format string) error

type StrDirectoryEntry

type StrDirectoryEntry struct {
	Name string
	Size string
}

type StrEntryDiff

type StrEntryDiff struct {
	Name  string
	Size1 string
	Size2 string
}

type StrInfo

type StrInfo struct {
	Package string
	Info1   StrPackageInfo
	Info2   StrPackageInfo
}

type StrMultiVersionInfo

type StrMultiVersionInfo struct {
	Package string
	Info1   []StrPackageInfo
	Info2   []StrPackageInfo
}

type StrPackageInfo

type StrPackageInfo struct {
	Version string
	Size    string
}

type StrPackageOutput

type StrPackageOutput struct {
	Name    string
	Path    string
	Version string
	Size    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL