oci

package
v0.0.0-...-8a41a53 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 29 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"
	ErrSeekFailedCode               = "replace_me"
	ErrCreateLayerCode              = "replace_me"
	ErrSavingImageCode              = "replace_me"
)

Functions

func AuthToOCIRegistry

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

func ErrAddLayer(err error) error

func ErrAppendingLayer

func ErrAppendingLayer(err error) error

func ErrAuthenticatingToRegistry

func ErrAuthenticatingToRegistry(err error) error

func ErrCompressingLayer

func ErrCompressingLayer(err error) error

func ErrConnectingToRegistry

func ErrConnectingToRegistry(err error) error

func ErrCreateLayer

func ErrCreateLayer(err error) error

func ErrFileNotFound

func ErrFileNotFound(err error, filePath string) error

func ErrGettingImage

func ErrGettingImage(err error) error

func ErrGettingLayer

func ErrGettingLayer(err error) error

func ErrPushingPackage

func ErrPushingPackage(err error) error

func ErrReadingFile

func ErrReadingFile(err error) error

func ErrSavingImage

func ErrSavingImage(err error) error

func ErrSeekFailed

func ErrSeekFailed(err error) error

func ErrTaggingPackage

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

func ErrWriteFile(err error) error

func ExtractAndValidateManifest

func ExtractAndValidateManifest(data []byte) error

func IsOCIArtifact

func IsOCIArtifact(data []byte) bool

IsOCIArtifact checks if the tarball is an OCI artifact by looking for manifest.json or index.json

func PullFromOCIRegistry

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

function to pull images from the public oci repository

func PushToOCIRegistry

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

func ValidateOCIArtifact

func ValidateOCIArtifact(tarballPath string) error

ValidateOCIArtifact validates the OCI artifact tarball using go-containerregistry's validate function

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