ociartifact

package
v2.0.0-...-98cc131 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

README

Access Method ociArtifact and ociRegistry - OCI Artifact Access

Synopsis
type: ociArtifact/v1

Provided blobs use the following media type:

  • application/vnd.oci.image.manifest.v1+tar+gzip: OCI image manifests
  • application/vnd.oci.image.index.v1+tar.gzip: OCI index manifests

Depending on the repository appropriate docker legacy types might be used.

The artifact content is provided in the Artifact Set Format. The tag is provided as annotation.

Description

This method implements the access of an OCI artifact stored in an OCI registry.

Supported specification version is v1

Specification Versions
Version v1

The type specific specification fields are:

  • imageReference string

    OCI image/artifact reference following the possible docker schemes:

    • <repo>/<artifact>:<digest>@<tag>
    • <host>[<port>]/<repo path>/<artifact>:<version>@<tag>
Go Bindings

The go binding can be found here

Documentation

Index

Constants

View Source
const (
	Type   = "ociArtifact"
	TypeV1 = Type + runtime.VersionSeparator + "v1"
)

Type is the access type of a oci registry.

View Source
const (
	LegacyType   = "ociRegistry"
	LegacyTypeV1 = LegacyType + runtime.VersionSeparator + "v1"
)

Variables

View Source
var REALM = ocmlog.DefineSubRealm("access method ociArtifact", "accessmethod/ociartifact")

Functions

func AddConfig

func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error

func Hint

func Hint(nv common.NameVersion, locator, repo, version string) string

func Is

func Is(spec cpi.AccessSpec) bool

func Logger

func Logger(c ContextProvider, keyValuePairs ...interface{}) logging.Logger

func NewMethod

func NewMethod(ctx cpi.ContextProvider, a cpi.AccessSpec, ref string, repo ...oci.Repository) (*accessMethod, error)

Types

type AccessMethod

type AccessMethod = *accessMethod

type AccessSpec

type AccessSpec struct {
	runtime.ObjectVersionedType `json:",inline"`

	// ImageReference is the actual reference to the oci image repository and tag.
	ImageReference string `json:"imageReference"`
}

AccessSpec describes the access for a oci registry.

func New

func New(ref string) *AccessSpec

New creates a new oci registry access spec version v1.

func (*AccessSpec) AccessMethod

func (*AccessSpec) Describe

func (a *AccessSpec) Describe(ctx cpi.Context) string

func (*AccessSpec) GetInexpensiveContentVersionIdentity

func (a *AccessSpec) GetInexpensiveContentVersionIdentity(cv cpi.ComponentVersionAccess) string

func (*AccessSpec) GetReferenceHint

func (a *AccessSpec) GetReferenceHint(cv cpi.ComponentVersionAccess) string

func (*AccessSpec) GetType

func (_ *AccessSpec) GetType() string

func (*AccessSpec) GlobalAccessSpec

func (a *AccessSpec) GlobalAccessSpec(ctx cpi.Context) cpi.AccessSpec

func (*AccessSpec) IsLocal

func (_ *AccessSpec) IsLocal(cpi.Context) bool

type ContextProvider

type ContextProvider interface {
	GetContext() cpi.Context
}

func WrapContextProvider

func WrapContextProvider(ctx cpi.ContextProvider) ContextProvider

Jump to

Keyboard shortcuts

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