ociutils

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashData

func HashData(data []byte) string

func PrintArtifact

func PrintArtifact(pr common.Printer, art cpi.ArtifactAccess, listFiles bool)

func PrintIndex

func PrintIndex(pr common.Printer, i cpi.IndexAccess, listFiles bool)

func PrintLayer

func PrintLayer(pr common.Printer, blob blobaccess.BlobAccess, listFiles bool)

func PrintManifest

func PrintManifest(pr common.Printer, m cpi.ManifestAccess, listFiles bool)

func RegisterInfoHandler

func RegisterInfoHandler(mime string, h InfoHandler)

Types

type ArtVersion added in v0.18.0

type ArtVersion struct {
	// +optional
	Tag *string `json:"tag,omitempty"`
	// +optional
	Digest *digest.Digest `json:"digest,omitempty"`
}

ArtVersion is the version part of an OCI reference consisting of an optional tag and/or digest. Both parts may be nil, if a reference does not include a version part. Such objects are sub objects of (oci.)ArtSpec, which has be moved to separate package to avoid package cycles. The methods are derived from ArtSpec.

func ParseVersion added in v0.18.0

func ParseVersion(vers string) (*ArtVersion, error)

ParseVersion parses the version part of an OCI reference consisting of an optional tag and/or digest.

func (*ArtVersion) GetDigest added in v0.18.0

func (v *ArtVersion) GetDigest() digest.Digest

func (*ArtVersion) GetTag added in v0.18.0

func (v *ArtVersion) GetTag() string

func (*ArtVersion) IsDigested added in v0.18.0

func (v *ArtVersion) IsDigested() bool

func (*ArtVersion) IsTagged added in v0.18.0

func (v *ArtVersion) IsTagged() bool

func (*ArtVersion) IsVersion added in v0.18.0

func (v *ArtVersion) IsVersion() bool

IsVersion returns true, if the object ref is given and describes a dedicated version, either by tag or digest. As part of the ArtSpec type in oci, it might describe no version part. THis method indicates, whether a version part is present.

func (*ArtVersion) Version added in v0.18.0

func (r *ArtVersion) Version() string

func (*ArtVersion) VersionSpec added in v0.18.0

func (v *ArtVersion) VersionSpec() string

type ArtifactInfo

type ArtifactInfo struct {
	Digest     digest.Digest `json:"digest"`
	Type       string        `json:"type"`
	Descriptor interface{}   `json:"descriptor"`
	Config     *BlobInfo     `json:"config,omitempty"`
	Layers     []*BlobInfo   `json:"layers,omitempty"`
	Manifests  []*BlobInfo   `json:"manifests,omitempty"`
}

func GetArtifactInfo

func GetArtifactInfo(art cpi.ArtifactAccess, layerFiles bool) *ArtifactInfo

func GetIndexInfo

func GetIndexInfo(i cpi.IndexAccess, layerFiles bool) *ArtifactInfo

func GetManifestInfo

func GetManifestInfo(m cpi.ManifestAccess, layerFiles bool) *ArtifactInfo

type BlobInfo

type BlobInfo struct {
	Error    string          `json:"error,omitempty"`
	Unparsed string          `json:"unparsed,omitempty"`
	Content  json.RawMessage `json:"content,omitempty"`
	Type     string          `json:"type,omitempty"`
	Digest   digest.Digest   `json:"digest,omitempty"`
	Size     int64           `json:"size,omitempty"`
	Info     interface{}     `json:"info,omitempty"`
}

type InfoHandler

type InfoHandler interface {
	Description(pr common.Printer, m cpi.ManifestAccess, config []byte)
	Info(m cpi.ManifestAccess, config []byte) interface{}
}

type LayerInfo

type LayerInfo struct {
	Description string      `json:"description,omitempty"`
	Error       string      `json:"error,omitempty"`
	Unparsed    string      `json:"unparsed,omitempty"`
	Content     interface{} `json:"content,omitempty"`
}

func GetLayerInfo

func GetLayerInfo(blob blobaccess.BlobAccess, layerFiles bool) *LayerInfo

Directories

Path Synopsis
ignore
Package ignore provides tools for writing ignore files (a la .gitignore).
Package ignore provides tools for writing ignore files (a la .gitignore).

Jump to

Keyboard shortcuts

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