oci

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

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

Artifact represents an OCI artifact/repository. It can either be a single manifest or an index (manifest list).

func NewIndexArtifact

func NewIndexArtifact(i *Index) (*Artifact, error)

NewIndexArtifact creates a new OCI artifact of type index

func NewManifestArtifact

func NewManifestArtifact(m *Manifest) (*Artifact, error)

NewManifestArtifact creates a new OCI artifact of type manifest

func (*Artifact) GetIndex

func (a *Artifact) GetIndex() *Index

GetManifest returns the index property

func (*Artifact) GetManifest

func (a *Artifact) GetManifest() *Manifest

GetManifest returns the manifest property

func (*Artifact) IsIndex

func (a *Artifact) IsIndex() bool

func (*Artifact) IsManifest

func (a *Artifact) IsManifest() bool

func (*Artifact) MarshalJSON

func (a *Artifact) MarshalJSON() ([]byte, error)

func (*Artifact) SetIndex

func (a *Artifact) SetIndex(i *Index) error

SetIndex sets the index property. If the OCI artifact is of type manifest, an error is returned.

func (*Artifact) SetManifest

func (a *Artifact) SetManifest(m *Manifest) error

SetManifest sets the manifest property. If the OCI artifact is of type index, an error is returned.

type Index

type Index struct {
	Manifests   []*Manifest
	Annotations map[string]string
}

Index represents an OCI image index

type Manifest

type Manifest struct {
	Descriptor ocispecv1.Descriptor
	Data       *ocispecv1.Manifest
}

Manifest represents am OCI image manifest

type RefSpec

type RefSpec struct {
	// Host is the hostname of a oci ref.
	Host string
	// Repository is the part of a reference without its hostname
	Repository string
	// +optional
	Tag *string
	// +optional
	Digest *digest.Digest
}

RefSpec is a go internal representation of a oci reference.

func ParseRef

func ParseRef(ref string) (RefSpec, error)

ParseRef parses a oci reference into a internal representation.

func (RefSpec) DeepCopy

func (r RefSpec) DeepCopy() RefSpec

func (*RefSpec) Name

func (r *RefSpec) Name() string

func (RefSpec) String

func (r RefSpec) String() string

Jump to

Keyboard shortcuts

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