oci

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 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 added in v0.5.0

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

func IsErrBlobNotFound

func IsErrBlobNotFound(err error) bool

func IsIntermediate

func IsIntermediate(spec RepositorySpec) bool

func IsUnknown added in v0.3.0

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 added in v0.3.0

func (r *ArtSpec) IsRegistry() bool

func (*ArtSpec) IsTagged added in v0.3.0

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 added in v0.3.0

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 added in v0.3.0

type ConsumerIdentityProvider = internal.ConsumerIdentityProvider

type Context

type Context = internal.Context

func DefinedForContext

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

func FromContext added in v0.3.0

func FromContext(ctx context.Context) Context

func FromProvider added in v0.3.0

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 added in v0.3.0

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.

Directories

Path Synopsis
cpi
helm/ignore
Package ignore provides tools for writing ignore files (a la .gitignore).
Package ignore provides tools for writing ignore files (a la .gitignore).
ctf

Jump to

Keyboard shortcuts

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