Documentation
¶
Overview ¶
Package example contains a simple implementation providing a virtual OCM repository based on some opinionated filesystem structure. It uses the virtual package by providing a dedicated implementation of the virtual.Access interface working on a virtual filesystem.
Index ¶
- func NewRepository(ctx cpi.ContextProvider, fs vfs.FileSystem, readonly bool, path ...string) (cpi.Repository, error)
- type Access
- func (a *Access) Close() error
- func (a *Access) ComponentLister() cpi.ComponentLister
- func (a *Access) ExistsComponentVersion(name string, version string) (bool, error)
- func (a *Access) GetComponentVersion(comp, version string) (virtual.VersionAccess, error)
- func (a *Access) ListVersions(comp string) ([]string, error)
- func (a *Access) Reset() error
- type Index
- type VersionAccess
- func (v *VersionAccess) AddBlob(blob cpi.BlobAccess) (string, error)
- func (v *VersionAccess) Close() error
- func (v *VersionAccess) GetBlob(name string) (cpi.DataAccess, error)
- func (v *VersionAccess) GetDescriptor() *compdesc.ComponentDescriptor
- func (v *VersionAccess) GetInexpensiveContentVersionIdentity(a cpi.AccessSpec) string
- func (v *VersionAccess) IsReadOnly() bool
- func (v *VersionAccess) Update() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
func NewRepository(ctx cpi.ContextProvider, fs vfs.FileSystem, readonly bool, path ...string) (cpi.Repository, error)
Types ¶
type Access ¶
type Access struct {
// contains filtered or unexported fields
}
func (*Access) ComponentLister ¶
func (a *Access) ComponentLister() cpi.ComponentLister
func (*Access) ExistsComponentVersion ¶
func (*Access) GetComponentVersion ¶
func (a *Access) GetComponentVersion(comp, version string) (virtual.VersionAccess, error)
type VersionAccess ¶
type VersionAccess struct {
// contains filtered or unexported fields
}
func (*VersionAccess) AddBlob ¶
func (v *VersionAccess) AddBlob(blob cpi.BlobAccess) (string, error)
func (*VersionAccess) Close ¶
func (v *VersionAccess) Close() error
func (*VersionAccess) GetBlob ¶
func (v *VersionAccess) GetBlob(name string) (cpi.DataAccess, error)
func (*VersionAccess) GetDescriptor ¶
func (v *VersionAccess) GetDescriptor() *compdesc.ComponentDescriptor
func (*VersionAccess) GetInexpensiveContentVersionIdentity ¶
func (v *VersionAccess) GetInexpensiveContentVersionIdentity(a cpi.AccessSpec) string
func (*VersionAccess) IsReadOnly ¶
func (v *VersionAccess) IsReadOnly() bool
func (*VersionAccess) Update ¶
func (v *VersionAccess) Update() error
Click to show internal directories.
Click to hide internal directories.