oci

package
v0.0.0-...-877fc11 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIND_OCIARTIFACT = internal.KIND_OCIARTIFACT
	KIND_MEDIATYPE   = blobaccess.KIND_MEDIATYPE
	KIND_BLOB        = blobaccess.KIND_BLOB
)
View Source
const (
	KIND_OCI_REFERENCE       = "oci reference"
	KIND_ARETEFACT_REFERENCE = "artifact reference"
)

to find a suitable secret for images on Docker Hub, we need its two domains to do matching.

View Source
const CONTEXT_TYPE = internal.CONTEXT_TYPE
View Source
const CommonTransportFormat = internal.CommonTransportFormat

Variables

This section is empty.

Functions

func AsTags

func AsTags(tag string) []string

func DefaultContext

func DefaultContext() internal.Context

func GetConsumerIdForRef

func GetConsumerIdForRef(ref string) (cpi.ConsumerIdentity, error)

func IsErrBlobNotFound

func IsErrBlobNotFound(err error) bool

func IsIntermediate

func IsIntermediate(spec RepositorySpec) bool

func IsUnknown

func IsUnknown(r RepositorySpec) bool

func StandardOCIRef

func StandardOCIRef(host, repository, version string) string

func WithContext

func WithContext(ctx context.Context) internal.Builder

func WithCredentials

func WithCredentials(ctx credentials.Context) internal.Builder

func WithRepositorySpecHandlers

func WithRepositorySpecHandlers(reg RepositorySpecHandlers) internal.Builder

func WithRepositoyTypeScheme

func WithRepositoyTypeScheme(scheme RepositoryTypeScheme) internal.Builder

Types

type ArtSpec

type ArtSpec struct {
	// Repository is the part of a reference without its hostname
	Repository string `json:"repository"`
	// +optional
	Tag *string `json:"tag,omitempty"`
	// +optional
	Digest *digest.Digest `json:"digest,omitempty"`
}

ArtSpec is a go internal representation of a oci reference.

func ParseArt

func ParseArt(art string) (ArtSpec, error)

func (*ArtSpec) IsRegistry

func (r *ArtSpec) IsRegistry() bool

func (*ArtSpec) IsTagged

func (r *ArtSpec) IsTagged() bool

func (*ArtSpec) IsVersion

func (r *ArtSpec) IsVersion() bool

func (*ArtSpec) Reference

func (r *ArtSpec) Reference() string

func (*ArtSpec) String

func (r *ArtSpec) String() string

func (*ArtSpec) Version

func (r *ArtSpec) Version() string

type ArtifactAccess

type ArtifactAccess = internal.ArtifactAccess

type ArtifactContainer

type ArtifactContainer interface {
	GetArtifact(version string) (ArtifactAccess, error)
}

type BlobAccess

type BlobAccess = internal.BlobAccess

type ConsumerIdentityProvider

type ConsumerIdentityProvider = internal.ConsumerIdentityProvider

type Context

type Context = internal.Context

func DefinedForContext

func DefinedForContext(ctx context.Context) (Context, bool)

func FromContext

func FromContext(ctx context.Context) Context

func FromProvider

func FromProvider(p ContextProvider) Context

func New

func New(mode ...datacontext.BuilderMode) Context

type ContextProvider

type ContextProvider = internal.ContextProvider

type DataAccess

type DataAccess = internal.DataAccess

type EvaluationResult

type EvaluationResult struct {
	Ref        RefSpec
	Repository Repository
	Namespace  NamespaceAccess
	Artifact   ArtifactAccess
}

type GenericRepositorySpec

type GenericRepositorySpec = internal.GenericRepositorySpec

func ToGenericRepositorySpec

func ToGenericRepositorySpec(spec RepositorySpec) (*GenericRepositorySpec, error)

type IndexAccess

type IndexAccess = internal.IndexAccess

type IntermediateRepositorySpecAspect

type IntermediateRepositorySpecAspect = internal.IntermediateRepositorySpecAspect

type ManifestAccess

type ManifestAccess = internal.ManifestAccess

type NamespaceAccess

type NamespaceAccess = internal.NamespaceAccess

type NamespaceContainer

type NamespaceContainer interface {
	LookupNamespace(name string) (NamespaceAccess, error)
}

type NamespaceLister

type NamespaceLister = internal.NamespaceLister

type RefSpec

type RefSpec struct {
	UniformRepositorySpec `json:",inline"`
	ArtSpec               `json:",inline"`
}

RefSpec is a go internal representation of an oci reference.

func ParseRef

func ParseRef(ref string) (RefSpec, error)

ParseRef parses a oci reference into a internal representation.

func (*RefSpec) CredHost

func (r *RefSpec) CredHost() string

CredHost fallback to legacy docker domain if applicable this is how containerd translates the old domain for DockerHub to the new one, taken from containerd/reference/docker/reference.go:674.

func (RefSpec) DeepCopy

func (r RefSpec) DeepCopy() RefSpec

func (*RefSpec) Name

func (r *RefSpec) Name() string

func (*RefSpec) String

func (r *RefSpec) String() string

type Repository

type Repository = internal.Repository

type RepositorySpec

type RepositorySpec = internal.RepositorySpec

type RepositorySpecHandler

type RepositorySpecHandler = internal.RepositorySpecHandler

type RepositorySpecHandlers

type RepositorySpecHandlers = internal.RepositorySpecHandlers

type RepositoryType

type RepositoryType = internal.RepositoryType

type RepositoryTypeScheme

type RepositoryTypeScheme = internal.RepositoryTypeScheme

type Session

type Session interface {
	datacontext.Session

	LookupRepository(Context, RepositorySpec) (Repository, error)
	LookupNamespace(NamespaceContainer, string) (NamespaceAccess, error)
	GetArtifact(ArtifactContainer, string) (ArtifactAccess, error)
	EvaluateRef(ctx Context, ref string) (*EvaluationResult, error)
	DetermineRepository(ctx Context, ref string) (Repository, UniformRepositorySpec, error)
	DetermineRepositoryBySpec(ctx Context, spec *UniformRepositorySpec) (Repository, error)
}

func NewSession

func NewSession(s datacontext.Session) Session

type UniformRepositorySpec

type UniformRepositorySpec = internal.UniformRepositorySpec

func ParseRepo

func ParseRepo(ref string) (UniformRepositorySpec, error)

ParseRepo parses a standard oci repository reference into an internal representation.

Jump to

Keyboard shortcuts

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