image

package
v0.0.0-...-d8f7d12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortDirectories

func SortDirectories(directories []Directory)

Types

type Annotation

type Annotation struct {
	Object *hash.Hash // These are mutually exclusive.
	URL    string
}

type Directory

type Directory struct {
	Name     string
	Metadata DirectoryMetadata
}

type DirectoryMetadata

type DirectoryMetadata struct {
	OwnerGroup string
}

type Image

type Image struct {
	BuildBranch   string
	BuildCommitId string
	CreatedBy     string // Username. Set by imageserver. Empty: unauthenticated
	Filter        *filter.Filter
	FileSystem    *filesystem.FileSystem
	Triggers      *triggers.Triggers
	ReleaseNotes  *Annotation
	BuildLog      *Annotation
	CreatedOn     time.Time
	ExpiresAt     time.Time
	Packages      []Package
}

func (*Image) ForEachObject

func (image *Image) ForEachObject(objectFunc func(hash.Hash) error) error

ForEachObject will call objectFunc for all objects (including those for annotations) for the image. If objectFunc returns a non-nil error, processing stops and the error is returned.

func (*Image) GetMissingObjects

func (image *Image) GetMissingObjects(objectServer objectserver.ObjectServer,
	objectsGetter objectserver.ObjectsGetter, logger log.DebugLogger) error

GetMissingObjects will check if objectServer has all the objects for the image and if any are missing it will download them from objectsGetter and add them to objectServer.

func (*Image) ListMissingObjects

func (image *Image) ListMissingObjects(
	objectsChecker objectserver.ObjectsChecker) ([]hash.Hash, error)

func (*Image) ListObjects

func (image *Image) ListObjects() []hash.Hash

ListObjects will return a list of all objects (including those for annotations for an image).

func (*Image) ReplaceStrings

func (image *Image) ReplaceStrings(replaceFunc func(string) string)

func (*Image) Verify

func (image *Image) Verify() error

Verify will perform some self-consistency checks on the image. If a problem is found, an error is returned.

func (*Image) VerifyObjects

func (image *Image) VerifyObjects(checker objectserver.ObjectsChecker) error

func (*Image) VerifyRequiredPaths

func (image *Image) VerifyRequiredPaths(requiredPaths map[string]rune) error

VerifyRequiredPaths will verify if required paths are present in the image. The table of required paths is given by requiredPaths. If the image is a sparse image (has no filter), then this check is skipped. If a problem is found, an error is returned. This function will create cache data associated with the image, consuming more memory.

type Package

type Package struct {
	Name    string
	Size    uint64 // Bytes.
	Version string
}

Jump to

Keyboard shortcuts

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