virtual

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(ctxp cpi.ContextProvider, acc Access) cpi.Repository

Types

type Access

type Access interface {
	ComponentLister() cpi.ComponentLister

	ExistsComponentVersion(name string, version string) (bool, error)
	ListVersions(comp string) ([]string, error)

	GetComponentVersion(comp, version string) (VersionAccess, error)

	IsReadOnly() bool
	SetReadOnly()
	Close() error
}

type ComponentVersionContainer

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

func (*ComponentVersionContainer) AccessMethod

func (*ComponentVersionContainer) AddBlob added in v0.5.0

func (c *ComponentVersionContainer) AddBlob(blob cpi.BlobAccess, refName string, global cpi.AccessSpec) (cpi.AccessSpec, error)

func (*ComponentVersionContainer) Check

func (c *ComponentVersionContainer) Check() error

func (*ComponentVersionContainer) Close

func (c *ComponentVersionContainer) Close() error

func (*ComponentVersionContainer) GetBlob added in v0.5.0

func (c *ComponentVersionContainer) GetBlob(name string) (cpi.DataAccess, error)

func (*ComponentVersionContainer) GetContext

func (c *ComponentVersionContainer) GetContext() cpi.Context

func (*ComponentVersionContainer) GetDescriptor

func (*ComponentVersionContainer) GetInexpensiveContentVersionIdentity

func (c *ComponentVersionContainer) GetInexpensiveContentVersionIdentity(a cpi.AccessSpec, cv refmgmt.ExtendedAllocatable) string

func (*ComponentVersionContainer) GetParentBridge added in v0.5.0

func (*ComponentVersionContainer) GetStorageContext

func (c *ComponentVersionContainer) GetStorageContext() cpi.StorageContext

func (*ComponentVersionContainer) IsClosed

func (c *ComponentVersionContainer) IsClosed() bool

func (*ComponentVersionContainer) IsReadOnly

func (c *ComponentVersionContainer) IsReadOnly() bool

func (*ComponentVersionContainer) Repository

func (c *ComponentVersionContainer) Repository() cpi.Repository

func (*ComponentVersionContainer) SetBridge added in v0.5.0

func (*ComponentVersionContainer) SetDescriptor added in v0.5.0

func (*ComponentVersionContainer) SetReadOnly added in v0.9.0

func (c *ComponentVersionContainer) SetReadOnly()

func (*ComponentVersionContainer) Update

func (c *ComponentVersionContainer) Update() error

type Index

type Index[I interface{}] struct {
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex[I interface{}]() *Index[I]

func (*Index[I]) Add

func (i *Index[I]) Add(cd *compdesc.ComponentDescriptor, info I) error

func (*Index[I]) Get

func (i *Index[I]) Get(comp, vers string) *IndexEntry[I]

func (*Index[I]) GetComponents

func (i *Index[I]) GetComponents(prefix string, closure bool) ([]string, error)

func (*Index[I]) GetVersions

func (i *Index[I]) GetVersions(comp string) []string

func (*Index[I]) NumComponents

func (i *Index[I]) NumComponents(prefix string) (int, error)

func (*Index[I]) Set

func (i *Index[I]) Set(cd *compdesc.ComponentDescriptor, info I)

type IndexEntry

type IndexEntry[I interface{}] struct {
	// contains filtered or unexported fields
}

func (*IndexEntry[I]) CD

func (*IndexEntry[I]) Info

func (i *IndexEntry[I]) Info() I

type RepositoryImpl

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

func (*RepositoryImpl) Close

func (r *RepositoryImpl) Close() error

func (*RepositoryImpl) ComponentLister

func (r *RepositoryImpl) ComponentLister() cpi.ComponentLister

func (*RepositoryImpl) ExistsComponentVersion

func (r *RepositoryImpl) ExistsComponentVersion(name string, version string) (bool, error)

func (*RepositoryImpl) GetContext added in v0.5.0

func (r *RepositoryImpl) GetContext() cpi.Context

func (*RepositoryImpl) GetSpecification

func (r *RepositoryImpl) GetSpecification() cpi.RepositorySpec

func (*RepositoryImpl) IsReadOnly added in v0.9.0

func (r *RepositoryImpl) IsReadOnly() bool

func (*RepositoryImpl) LookupComponent

func (r *RepositoryImpl) LookupComponent(name string) (*repocpi.ComponentAccessInfo, error)

func (*RepositoryImpl) SetBridge added in v0.5.0

func (r *RepositoryImpl) SetBridge(base repocpi.RepositoryBridge)

func (*RepositoryImpl) SetReadOnly added in v0.9.0

func (r *RepositoryImpl) SetReadOnly()

type RepositorySpec

type RepositorySpec struct {
	runtime.ObjectVersionedTypedObject
	Access Access `json:"-"`
}

func NewRepositorySpec

func NewRepositorySpec(acc Access) *RepositorySpec

func (RepositorySpec) AsUniformSpec

func (r RepositorySpec) AsUniformSpec(context internal.Context) *cpi.UniformRepositorySpec

func (*RepositorySpec) Repository

func (r *RepositorySpec) Repository(ctx cpi.Context, credentials credentials.Credentials) (internal.Repository, error)

type RepositorySpecProvider

type RepositorySpecProvider interface {
	GetSpecification() cpi.RepositorySpec
}

type VersionAccess

type VersionAccess interface {
	GetDescriptor() *compdesc.ComponentDescriptor
	GetBlob(name string) (cpi.DataAccess, error)
	AddBlob(blob cpi.BlobAccess) (string, error)
	Update() error
	Close() error

	IsReadOnly() bool
	SetReadOnly()
	GetInexpensiveContentVersionIdentity(a cpi.AccessSpec) string
}

Directories

Path Synopsis
Package example contains a simple implementation providing a virtual OCM repository based on some opinionated filesystem structure.
Package example contains a simple implementation providing a virtual OCM repository based on some opinionated filesystem structure.

Jump to

Keyboard shortcuts

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