image

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 13 Imported by: 64

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
	BuildGitUrl   string
	CreatedBy     string // Username. Set by imageserver. Empty: unauthenticated
	CreatedFor    string // Username. Set by imaginator.
	Filter        *filter.Filter
	FileSystem    *filesystem.FileSystem
	Triggers      *triggers.Triggers
	ReleaseNotes  *Annotation
	BuildLog      *Annotation
	CreatedOn     time.Time
	ExpiresAt     time.Time
	Packages      []Package
	SourceImage   string // Name of source image.
}

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) RegisterStrings added in v0.3.3

func (image *Image) RegisterStrings(registerFunc func(string))

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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