Documentation ¶
Index ¶
- func CheckSameFile(f1name, f2name string) (bool, error)
- func CheckSameSymlink(f1name, f2name string) (bool, error)
- func CheckTar(image string) bool
- func CleanFilePath(dirtyPath string) string
- func CleanupImage(image Image)
- func DirIsEmpty(path string) (bool, error)
- func GetFileContents(path string) (*string, error)
- func GetFileSystemForImage(image v1.Image, root string, whitelist []string) error
- func GetFileSystemForLayer(layer v1.Layer, root string, whitelist []string) error
- func GetImageLayers(pathToImage string) []string
- func GetSize(path string) int64
- func HasFilepathPrefix(path, prefix string) bool
- func HasTag(image string) bool
- func IsTar(path string) bool
- func RemoveTag(image string) string
- func SortMap(m map[string]string) string
- type Directory
- type DirectoryEntry
- type Image
- type ImageHistoryItem
- type Layer
- type OriginalPerm
- type TestImage
- func (i *TestImage) BlobSet() (map[v1.Hash]struct{}, error)
- func (i *TestImage) ConfigFile() (*v1.ConfigFile, error)
- func (i *TestImage) ConfigName() (v1.Hash, error)
- func (i *TestImage) Digest() (v1.Hash, error)
- func (i *TestImage) LayerByDiffID(diffID v1.Hash) (v1.Layer, error)
- func (i *TestImage) LayerByDigest(v1.Hash) (v1.Layer, error)
- func (i *TestImage) Layers() ([]v1.Layer, error)
- func (i *TestImage) Manifest() (*v1.Manifest, error)
- func (i *TestImage) MediaType() (types.MediaType, error)
- func (i *TestImage) RawConfigFile() ([]byte, error)
- func (i *TestImage) RawManifest() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSameFile ¶
func CheckSameSymlink ¶ added in v0.10.0
func CleanFilePath ¶ added in v0.15.0
CleanFilePath removes characters from a given path that cannot be used in paths by the underlying platform (e.g. Windows)
func CleanupImage ¶
func CleanupImage(image Image)
func DirIsEmpty ¶ added in v0.10.0
given a path to a directory, check if it has any contents
func GetFileContents ¶ added in v0.5.1
GetFileContents returns the contents of a file at the specified path
func GetFileSystemForImage ¶ added in v0.10.0
unpack image filesystem to local disk if provided directory is not empty, do nothing
func GetFileSystemForLayer ¶ added in v0.10.0
GetFileSystemForLayer unpacks a layer to local disk
func GetImageLayers ¶
func HasFilepathPrefix ¶ added in v0.7.0
HasFilepathPrefix checks if the given file path begins with prefix
Types ¶
type DirectoryEntry ¶
func CreateDirectoryEntries ¶
func CreateDirectoryEntries(root string, entryNames []string) (entries []DirectoryEntry)
func GetDirectoryEntries ¶
func GetDirectoryEntries(d Directory) []DirectoryEntry
type Image ¶
func GetImage ¶ added in v0.14.0
GetImage infers the source of an image and retrieves a v1.Image reference to it. Once a reference is obtained, it attempts to unpack the v1.Image's reader's contents into a temp directory on the local filesystem.
func GetImageForName ¶ added in v0.14.0
GetImageForName retrieves an image by name alone. It does not return layer information, or respect caching.
type ImageHistoryItem ¶
type ImageHistoryItem struct {
CreatedBy string `json:"created_by"`
}
type OriginalPerm ¶ added in v0.9.0
type OriginalPerm struct {
// contains filtered or unexported fields
}
type TestImage ¶ added in v0.10.0
type TestImage struct {
Config *v1.ConfigFile
}
func (*TestImage) ConfigFile ¶ added in v0.10.0
func (i *TestImage) ConfigFile() (*v1.ConfigFile, error)