image

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LayerFormat = "%-25s %7s  %s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageConfig

type ImageConfig struct {
	History []ImageHistoryEntry `json:"history"`
	RootFs  RootFs              `json:"rootfs"`
}

func GetImageConfig

func GetImageConfig(imageTarPath string, manifest ImageManifest) ImageConfig

func NewImageConfig

func NewImageConfig(reader *tar.Reader, header *tar.Header) ImageConfig

type ImageHistoryEntry

type ImageHistoryEntry struct {
	ID         string
	Size       uint64
	Created    string `json:"created"`
	Author     string `json:"author"`
	CreatedBy  string `json:"created_by"`
	EmptyLayer bool   `json:"empty_layer"`
}

type ImageManifest

type ImageManifest struct {
	ConfigPath    string   `json:"Config"`
	RepoTags      []string `json:"RepoTags"`
	LayerTarPaths []string `json:"Layers"`
}

func NewImageManifest

func NewImageManifest(reader *tar.Reader, header *tar.Header) ImageManifest

type Layer

type Layer struct {
	TarPath  string
	History  ImageHistoryEntry
	Index    int
	Tree     *filetree.FileTree
	RefTrees []*filetree.FileTree
}

Layer represents a Docker image layer and metadata

func InitializeData

func InitializeData(imageID string) ([]*Layer, []*filetree.FileTree, float64, filetree.EfficiencySlice)

func (*Layer) Id

func (layer *Layer) Id() string

Id returns the truncated id of the current layer.

func (*Layer) String

func (layer *Layer) String() string

String represents a layer in a columnar format.

type ProgressBar

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

func NewProgressBar

func NewProgressBar(total int64) *ProgressBar

func (*ProgressBar) Done

func (pb *ProgressBar) Done()

func (*ProgressBar) String

func (pb *ProgressBar) String() string

func (*ProgressBar) Update

func (pb *ProgressBar) Update(currentValue int64) (hasChanged bool)

type RootFs

type RootFs struct {
	Type    string   `json:"type"`
	DiffIds []string `json:"diff_ids"`
}

Jump to

Keyboard shortcuts

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