oci

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when acbuild is asked to remove an element from a
	// list and the element is not present in the list
	ErrNotFound = fmt.Errorf("element to be removed does not exist in this image")
)

Functions

This section is empty.

Types

type Image

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

Manifest is a struct with an open handle to a manifest that it can manipulate

func LoadImage

func LoadImage(ociPath string) (*Image, error)

func (*Image) AddAnnotation

func (i *Image) AddAnnotation(name, value string) error

func (*Image) AddEnv

func (i *Image) AddEnv(name, value string) error

func (*Image) AddLabel

func (i *Image) AddLabel(name, value string) error

func (*Image) AddMount

func (i *Image) AddMount(name, path string, readOnly bool) error

func (*Image) AddPort

func (i *Image) AddPort(name, protocol string, port, count uint, socketActivated bool) error

func (*Image) GetAnnotations

func (i *Image) GetAnnotations() (map[string]string, error)

func (*Image) GetConfig

func (i *Image) GetConfig() ociImage.Image

func (*Image) GetDiffIDs

func (i *Image) GetDiffIDs() []string

func (*Image) GetLayerDigests

func (i *Image) GetLayerDigests() []string

func (*Image) GetManifest

func (i *Image) GetManifest() ociImage.Manifest

func (*Image) GetRef

func (i *Image) GetRef() ociImage.Descriptor

func (*Image) NewTopLayer

func (i *Image) NewTopLayer(digestAlgo, layerDigest, diffId string, size int64) error

func (*Image) Print

func (i *Image) Print(w io.Writer, prettyPrint, printConfig bool) error

func (*Image) RemoveAnnotation

func (i *Image) RemoveAnnotation(name string) error

func (*Image) RemoveEnv

func (i *Image) RemoveEnv(name string) error

func (*Image) RemoveLabel

func (i *Image) RemoveLabel(name string) error

func (*Image) RemoveMount

func (i *Image) RemoveMount(mount string) error

func (*Image) RemovePort

func (i *Image) RemovePort(port string) error

func (*Image) Replace

func (i *Image) Replace(configPath string) error

Replace will replace the config in the expanded OCI image stored at a.CurrentImagePath with the new config stored at configPath

func (*Image) SetExec

func (i *Image) SetExec(cmd []string) error

SetExec sets the exec command for the untarred ACI stored at a.CurrentImagePath.

func (*Image) SetGroup

func (i *Image) SetGroup(group string) error

SetGroup will set the user (group name or GID) the app in this container will run as

func (*Image) SetTag

func (i *Image) SetTag(tag string) error

SetWorkingDir sets the tag for this OCI image to the given name

func (*Image) SetUser

func (i *Image) SetUser(user string) error

SetUser will set the user (username or UID) the app in this container will run as

func (*Image) SetWorkingDir

func (i *Image) SetWorkingDir(dir string) error

SetWorkingDir sets the WorkingDir value in the OCI's config

func (*Image) UpdateTopLayer

func (i *Image) UpdateTopLayer(digestAlgo, layerDigest, diffId string, size int64) (string, error)

Jump to

Keyboard shortcuts

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