img

package
v0.0.0-...-51dac0d Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRepoSubdirectory = "component-descriptors"

Variables

View Source
var (
	ErrAccessTypeNotSupported           = errors.New("access type not supported")
	ErrComponentNameMappingNotSupported = errors.New("componentNameMapping not supported")
)
View Source
var (
	ErrImageLayerPull       = errors.New("failed to pull layer")
	ErrInvalidImageSpecType = fmt.Errorf("invalid image spec type provided,"+
		" only '%s' '%s' are allowed", v1beta2.OciRefType, v1beta2.OciDirType)
	ErrTaintedArchive          = errors.New("content filepath tainted")
	ErrInvalidArchiveStructure = errors.New("tar archive has invalid structure, expected a single file")
)
View Source
var ErrLayerParsing = errors.New("layer could not be parsed")

Functions

This section is empty.

Types

type Layer

type Layer struct {
	v1beta2.LayerName
	LayerRepresentation
}

func (Layer) ConvertToImageSpec

func (l Layer) ConvertToImageSpec() (*v1beta2.ImageSpec, error)

type LayerRepresentation

type LayerRepresentation interface {
	ToInstallRaw() ([]byte, error)
}

type LayerType

type LayerType string

type Layers

type Layers []Layer

func Parse

func Parse(
	descriptor *compdesc.ComponentDescriptor,
) (Layers, error)

type OCI

type OCI struct {
	Repo               string                   `json:"repo"`
	Name               string                   `json:"name"`
	Ref                string                   `json:"ref"`
	Type               string                   `json:"type"`
	CredSecretSelector *apimetav1.LabelSelector `json:"credSecretSelector,omitempty"`
}

func (*OCI) String

func (o *OCI) String() string

func (*OCI) ToInstallRaw

func (o *OCI) ToInstallRaw() ([]byte, error)

type PathExtractor

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

func NewPathExtractor

func NewPathExtractor() *PathExtractor

func (PathExtractor) ExtractLayer

func (p PathExtractor) ExtractLayer(tarPath string) (string, error)

func (PathExtractor) GetPathForFetchedLayer

func (p PathExtractor) GetPathForFetchedLayer(ctx context.Context,
	imageSpec v1beta2.ImageSpec,
	keyChain authn.Keychain,
	filename string,
) (string, error)

func (PathExtractor) GetPathFromRawManifest

func (p PathExtractor) GetPathFromRawManifest(ctx context.Context, imageSpec v1beta2.ImageSpec,
	keyChain authn.Keychain,
) (string, error)

Jump to

Keyboard shortcuts

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