cpi

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

Context Provider Interface for Repository with OCI-Artifact-Data

Documentation

Index

Constants

View Source
const (
	KIND_OCIARTIFACT = internal.KIND_OCIARTIFACT
	KIND_MEDIATYPE   = blobaccess.KIND_MEDIATYPE
	KIND_BLOB        = blobaccess.KIND_BLOB
)
View Source
const CONTEXT_TYPE = internal.CONTEXT_TYPE
View Source
const CommonTransportFormat = internal.CommonTransportFormat

Variables

View Source
var ErrClosed = resource.ErrClosed

Functions

func ErrBlobNotFound

func ErrBlobNotFound(digest digest.Digest) error

func ErrUnknownArtifact

func ErrUnknownArtifact(name, version string) error

func FilterByNamespacePrefix

func FilterByNamespacePrefix(prefix string, list []string) []string

func FilterChildren

func FilterChildren(closure bool, prefix string, list []string) []string

func IsErrBlobNotFound

func IsErrBlobNotFound(err error) bool

func NewArtifactStateHandler

func NewArtifactStateHandler() accessobj.StateHandler

func NewIndexStateHandler

func NewIndexStateHandler() accessobj.StateHandler

func NewManifestStateHandler

func NewManifestStateHandler() accessobj.StateHandler

func RegisterRepositorySpecHandler

func RegisterRepositorySpecHandler(handler RepositorySpecHandler, types ...string)

func RegisterRepositoryType

func RegisterRepositoryType(rtype RepositoryType)

func RegisterRepositoryTypeVersions

func RegisterRepositoryTypeVersions(s RepositoryTypeVersionScheme)

Types

type Artifact

type Artifact = internal.Artifact

func NewArtifact

func NewArtifact(art Artifact) (Artifact, error)

NewArtifact provides a copy of the given artifact, which will keep track of the original serialization. This one is used as long as the artifact is unchanged. (the returned underlying implementation of the Artifact interface might differ from the original one).

type ArtifactAccess

type ArtifactAccess = internal.ArtifactAccess

func NewArtifactAccess

func NewArtifactAccess(impl ArtifactAccessImpl) ArtifactAccess

type ArtifactAccessImplBase

type ArtifactAccessImplBase = resource.ResourceImplBase[ArtifactAccess]

func NewArtifactAccessImplBase

func NewArtifactAccessImplBase(ns NamespaceAccessViewManager, closer ...io.Closer) (*ArtifactAccessImplBase, error)

type ArtifactAccessViewManager

type ArtifactAccessViewManager = resource.ViewManager[ArtifactAccess]

type ArtifactSink

type ArtifactSink = internal.ArtifactSink

type ArtifactSource

type ArtifactSource = internal.ArtifactSource

type ArtifactStateHandler

type ArtifactStateHandler struct{}

func (ArtifactStateHandler) Decode

func (i ArtifactStateHandler) Decode(data []byte) (interface{}, error)

func (ArtifactStateHandler) Encode

func (i ArtifactStateHandler) Encode(d interface{}) ([]byte, error)

func (ArtifactStateHandler) Equivalent

func (i ArtifactStateHandler) Equivalent(a, b interface{}) bool

func (ArtifactStateHandler) Initial

func (i ArtifactStateHandler) Initial() interface{}

type BlobAccess

type BlobAccess = internal.BlobAccess

type BlobSink

type BlobSink = internal.BlobSink

type BlobSource

type BlobSource = internal.BlobSource

type ConsumerIdentityProvider

type ConsumerIdentityProvider = internal.ConsumerIdentityProvider

type Context

type Context = internal.Context

func DefaultContext

func DefaultContext() Context

func FromProvider

func FromProvider(p ContextProvider) Context

func New

type ContextProvider

type ContextProvider = internal.ContextProvider

type DataAccess

type DataAccess = internal.DataAccess

type Descriptor

type Descriptor = ociv1.Descriptor

type GenericRepositorySpec

type GenericRepositorySpec = internal.GenericRepositorySpec

func ToGenericRepositorySpec

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

type IndexAccess

type IndexAccess = internal.IndexAccess

type IndexStateHandler

type IndexStateHandler struct{}

func (IndexStateHandler) Decode

func (i IndexStateHandler) Decode(data []byte) (interface{}, error)

func (IndexStateHandler) Encode

func (i IndexStateHandler) Encode(d interface{}) ([]byte, error)

func (IndexStateHandler) Equivalent

func (i IndexStateHandler) Equivalent(a, b interface{}) bool

func (IndexStateHandler) Initial

func (i IndexStateHandler) Initial() interface{}

type IntermediateRepositorySpecAspect

type IntermediateRepositorySpecAspect = internal.IntermediateRepositorySpecAspect

type ManifestAccess

type ManifestAccess = internal.ManifestAccess

type ManifestStateHandler

type ManifestStateHandler struct{}

func (ManifestStateHandler) Decode

func (i ManifestStateHandler) Decode(data []byte) (interface{}, error)

func (ManifestStateHandler) Encode

func (i ManifestStateHandler) Encode(d interface{}) ([]byte, error)

func (ManifestStateHandler) Equivalent

func (i ManifestStateHandler) Equivalent(a, b interface{}) bool

func (ManifestStateHandler) Initial

func (i ManifestStateHandler) Initial() interface{}

type NamespaceAccess

type NamespaceAccess = internal.NamespaceAccess

func NewNamespaceAccess

func NewNamespaceAccess(impl NamespaceAccessImpl, kind ...string) NamespaceAccess

type NamespaceAccessImpl

type NamespaceAccessImpl interface {
	internal.NamespaceAccessImpl

	resource.ResourceImplementation[NamespaceAccess]

	GetNamespace() string
}

func GetNamespaceAccessImplementation

func GetNamespaceAccessImplementation(n NamespaceAccess) (NamespaceAccessImpl, error)

type NamespaceAccessImplBase

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

func NewNamespaceAccessImplBase

func NewNamespaceAccessImplBase(namespace string, repo RepositoryViewManager, closer ...io.Closer) (*NamespaceAccessImplBase, error)

func (*NamespaceAccessImplBase) GetNamespace

func (b *NamespaceAccessImplBase) GetNamespace() string

type NamespaceAccessViewManager

type NamespaceAccessViewManager = resource.ViewManager[NamespaceAccess] // here you have to use an alias

type NamespaceLister

type NamespaceLister = internal.NamespaceLister

type Repository

type Repository = internal.Repository

func NewRepository

func NewRepository(impl RepositoryImpl, name ...string) Repository

type RepositoryImpl

func GetRepositoryImplementation

func GetRepositoryImplementation(n Repository) (RepositoryImpl, error)

type RepositoryImplBase

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

func NewRepositoryImplBase

func NewRepositoryImplBase(ctx Context) RepositoryImplBase

func (*RepositoryImplBase) GetContext

func (b *RepositoryImplBase) GetContext() Context

type RepositorySource

type RepositorySource = internal.RepositorySource

type RepositorySpec

type RepositorySpec = internal.RepositorySpec

type RepositorySpecHandler

type RepositorySpecHandler = internal.RepositorySpecHandler

type RepositorySpecHandlers

type RepositorySpecHandlers = internal.RepositorySpecHandlers

type RepositoryType

type RepositoryType = internal.RepositoryType

func NewRepositoryType

func NewRepositoryType[I RepositorySpec](name string) RepositoryType

func NewRepositoryTypeByConverter

func NewRepositoryTypeByConverter[I RepositorySpec, V runtime.TypedObject](name string, converter runtime.Converter[I, V]) RepositoryType

func NewRepositoryTypeByFormatVersion

func NewRepositoryTypeByFormatVersion(name string, fmt runtime.FormatVersion[RepositorySpec]) RepositoryType

type RepositoryTypeProvider

type RepositoryTypeProvider = internal.RepositoryTypeProvider

type RepositoryTypeScheme

type RepositoryTypeScheme = internal.RepositoryTypeScheme

type RepositoryTypeVersionScheme

type RepositoryTypeVersionScheme = runtime.TypeVersionScheme[RepositorySpec, RepositoryType]

func NewRepositoryTypeVersionScheme

func NewRepositoryTypeVersionScheme(kind string) RepositoryTypeVersionScheme

type RepositoryViewManager

type RepositoryViewManager = resource.ViewManager[Repository] // here you have to use an alias

type StringList

type StringList []string

func (*StringList) Add

func (s *StringList) Add(n string)

type UniformRepositorySpec

type UniformRepositorySpec = internal.UniformRepositorySpec

func UniformRepositorySpecForHostURL

func UniformRepositorySpecForHostURL(typ string, host string) *UniformRepositorySpec

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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