util

package
v0.0.0-...-21b60f4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractImage

func ExtractImage(path, dst string, fileMap map[string]struct{}) error

ExtractImage will extract the contents of the image at path to the directory at dst. If fileMap is set, only files in it will be extracted.

func GetManifest

func GetManifest(acipath string) (*schema.ImageManifest, error)

GetManifest will read in the manifest from the untarred ACI stored at acipath

func HashBlob

func HashBlob(blob []byte) string

func IsMounted

func IsMounted(path string) (bool, error)

func MarshalHashAndWrite

func MarshalHashAndWrite(ociPath string, data interface{}) (string, string, int, error)

func MaybeUnmount

func MaybeUnmount(path string) error

func ModifyManifest

func ModifyManifest(fn func(*schema.ImageManifest) error, acipath string) error

ModifyManifest will read in the manifest from the untarred ACI stored at acipath, run the fn function (which is intended to modify the manifest), and then write the resulting manifest back to the file it was read from.

func OCIExtractLayers

func OCIExtractLayers(layerIDs []string, imageLoc, blobsDest string) error

func OCINewExpandedLayer

func OCINewExpandedLayer(ociExpandedBlobsPath string) (string, error)

func PathWalker

func PathWalker(twriter *tar.Writer, tarSrcPath string) func(string, os.FileInfo, error) error

func PrintManifest

func PrintManifest(man *schema.ImageManifest, prettyPrint bool) error

PrintManifest will print the given manifest to stdout, optionally inserting whitespace to make it more human readable.

func RmAndMkdir

func RmAndMkdir(path string) error

RmAndMkdir will remove anything at path if it exists, and then create a directory at path.

func SplitOCILayerID

func SplitOCILayerID(layerID string) (string, string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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