oci

package
v0.7.42 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppendingLayerCode           = "meshkit-11147"
	ErrReadingFileCode              = "meshkit-11148"
	ErrUnSupportedLayerTypeCode     = "meshkit-11149"
	ErrGettingLayerCode             = "meshkit-11150"
	ErrCompressingLayerCode         = "meshkit-11151"
	ErrUnTaringLayerCode            = "meshkit-11152"
	ErrGettingImageCode             = "meshkit-11153"
	ErrValidatingImageCode          = "meshkit-11154"
	ErrConnectingToRegistryCode     = "meshkit-11243"
	ErrFileNotFoundCode             = "meshkit-11244"
	ErrAuthenticatingToRegistryCode = "meshkit-11245"
	ErrWriteFilesCode               = "meshkit-11246"
	ErrAddLayerCode                 = "meshkit-11247"
	ErrTaggingPackageCode           = "meshkit-11248"
	ErrPushingPackageCode           = "meshkit-11249"
)

Functions

func AuthToOCIRegistry added in v0.7.21

func AuthToOCIRegistry(repo *remote.Repository, registryURI, username, password string) error

authentification to the public oci registry registryURL example : docker.io

func BuildImage

func BuildImage(sourcePath string, opts ...BuildOption) (gcrv1.Image, error)

Builds OCI Img for the artifacts in the given path. Returns v1.Image manifest.

func CreateTempOCIContentDir

func CreateTempOCIContentDir() (tempDir string, err error)

func ErrAddLayer added in v0.7.21

func ErrAddLayer(err error) error

func ErrAppendingLayer

func ErrAppendingLayer(err error) error

func ErrAuthenticatingToRegistry added in v0.7.21

func ErrAuthenticatingToRegistry(err error) error

func ErrCompressingLayer

func ErrCompressingLayer(err error) error

func ErrConnectingToRegistry added in v0.7.21

func ErrConnectingToRegistry(err error) error

func ErrFileNotFound added in v0.7.21

func ErrFileNotFound(err error, filePath string) error

func ErrGettingImage

func ErrGettingImage(err error) error

func ErrGettingLayer

func ErrGettingLayer(err error) error

func ErrPushingPackage added in v0.7.21

func ErrPushingPackage(err error) error

func ErrReadingFile

func ErrReadingFile(err error) error

func ErrTaggingPackage added in v0.7.21

func ErrTaggingPackage(err error) error

func ErrUnSupportedLayerType

func ErrUnSupportedLayerType(err error) error

func ErrUnTaringLayer

func ErrUnTaringLayer(err error) error

func ErrValidatingImage

func ErrValidatingImage(err error) error

func ErrWriteFile added in v0.7.21

func ErrWriteFile(err error) error

func PullFromOCIRegistry added in v0.7.21

func PullFromOCIRegistry(dirPath, registryAdd, repositoryAdd, imageTag, username, password string) error

function to pull images from the public oci repository

func PushToOCIRegistry added in v0.7.21

func PushToOCIRegistry(dirPath, registryAdd, repositoryAdd, imageTag, username, password string) error

function to pull models from any OCI-compatible repository

func SaveOCIArtifact

func SaveOCIArtifact(img gcrv1.Image, artifactPath, name string) error

saves the oci artifact to the given path as tarball type

func UnCompressOCIArtifact

func UnCompressOCIArtifact(source, destination string) error

uncompress the OCI Artifact tarball at the given destination path

Types

type BuildOption

type BuildOption func(o *BuildOptions)

BuildOption is a function for configuring BuildOptions.

type BuildOptions

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

BuildOptions are options for configuring the Push operation.

type LayerType

type LayerType string

LayerType is an enumeration of the supported layer types when pushing an image.

const (
	// LayerTypeTarball produces a layer that contains a gzipped archive
	LayerTypeTarball LayerType = "tarball"
	// LayerTypeStatic produces a layer that contains the contents of a
	// file without any compression.
	LayerTypeStatic LayerType = "static"
)

Jump to

Keyboard shortcuts

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