Documentation ¶
Index ¶
- Constants
- Variables
- func GetFormats() []string
- func NewRepository(ctxp cpi.ContextProvider, s *RepositorySpec) (cpi.Repository, error)
- func NewStateHandler(fs vfs.FileSystem) accessobj.StateHandler
- func RegisterFormat(f accessobj.FormatHandler) *formatHandler
- type BlobSink
- type ComponentAccessImpl
- func (c *ComponentAccessImpl) Close() error
- func (c *ComponentAccessImpl) GetContext() cpi.Context
- func (c *ComponentAccessImpl) GetName() string
- func (c *ComponentAccessImpl) GetParentBridge() repocpi.RepositoryViewManager
- func (c *ComponentAccessImpl) HasVersion(vers string) (bool, error)
- func (c *ComponentAccessImpl) IsReadOnly() bool
- func (c *ComponentAccessImpl) ListVersions() ([]string, error)
- func (c *ComponentAccessImpl) LookupVersion(version string) (*repocpi.ComponentVersionAccessInfo, error)
- func (c *ComponentAccessImpl) NewVersion(version string, overrides ...bool) (*repocpi.ComponentVersionAccessInfo, error)
- func (c *ComponentAccessImpl) SetBridge(base repocpi.ComponentAccessBridge)
- type ComponentArchive
- func (c *ComponentArchive) AsRepository() cpi.Repository
- func (c *ComponentArchive) Close() error
- func (c *ComponentArchive) IsReadOnly() bool
- func (c *ComponentArchive) Repository() cpi.Repository
- func (c *ComponentArchive) SetName(n string)
- func (c *ComponentArchive) SetReadOnly()
- func (c *ComponentArchive) SetVersion(v string)
- type ComponentVersionContainer
- func (c *ComponentVersionContainer) AccessMethod(a cpi.AccessSpec, cv refmgmt.ExtendedAllocatable) (cpi.AccessMethod, error)
- func (c *ComponentVersionContainer) AddBlob(blob cpi.BlobAccess, refName string, global cpi.AccessSpec) (cpi.AccessSpec, error)
- func (c *ComponentVersionContainer) Close() error
- func (c *ComponentVersionContainer) GetBlob(name string) (cpi.DataAccess, error)
- func (c *ComponentVersionContainer) GetContext() cpi.Context
- func (c *ComponentVersionContainer) GetDescriptor() *compdesc.ComponentDescriptor
- func (c *ComponentVersionContainer) GetInexpensiveContentVersionIdentity(a cpi.AccessSpec, cv refmgmt.ExtendedAllocatable) string
- func (c *ComponentVersionContainer) GetParentBridge() repocpi.ComponentAccessBridge
- func (c *ComponentVersionContainer) GetStorageContext() cpi.StorageContext
- func (c *ComponentVersionContainer) IsReadOnly() bool
- func (c *ComponentVersionContainer) Repository() cpi.Repository
- func (c *ComponentVersionContainer) SetBridge(impl repocpi.ComponentVersionAccessBridge)
- func (c *ComponentVersionContainer) SetDescriptor(cd *compdesc.ComponentDescriptor) error
- func (c *ComponentVersionContainer) SetReadOnly()
- func (c *ComponentVersionContainer) Update() error
- type FormatHandler
- type Object
- type RepositoryImpl
- func (r *RepositoryImpl) Close() error
- func (r *RepositoryImpl) ComponentLister() cpi.ComponentLister
- func (r *RepositoryImpl) ExistsComponentVersion(name string, ref string) (bool, error)
- func (r *RepositoryImpl) Get() *ComponentArchive
- func (r *RepositoryImpl) GetComponents(prefix string, closure bool) ([]string, error)
- func (r *RepositoryImpl) GetContext() cpi.Context
- func (r *RepositoryImpl) GetSpecification() cpi.RepositorySpec
- func (r *RepositoryImpl) IsReadOnly() bool
- func (r *RepositoryImpl) LookupComponent(name string) (*repocpi.ComponentAccessInfo, error)
- func (r *RepositoryImpl) NumComponents(prefix string) (int, error)
- func (r *RepositoryImpl) SetBridge(base repocpi.RepositoryBridge)
- func (r *RepositoryImpl) SetReadOnly()
- type RepositorySpec
- type StateHandler
Constants ¶
View Source
const ( Type = "ComponentArchive" TypeV1 = Type + runtime.VersionSeparator + "v1" )
View Source
const AltType = "ca"
View Source
const BlobsDirectoryName = "blobs"
BlobsDirectoryName is the name of the blob directory in the tar.
View Source
const ComponentDescriptorFileName = compdesc.ComponentDescriptorFileName
ComponentDescriptorFileName is the name of the component-descriptor file.
Variables ¶
View Source
var ( FormatDirectory = RegisterFormat(accessobj.FormatDirectory) FormatTAR = RegisterFormat(accessobj.FormatTAR) FormatTGZ = RegisterFormat(accessobj.FormatTGZ) )
Functions ¶
func GetFormats ¶
func GetFormats() []string
func NewRepository ¶
func NewRepository(ctxp cpi.ContextProvider, s *RepositorySpec) (cpi.Repository, error)
func NewStateHandler ¶
func NewStateHandler(fs vfs.FileSystem) accessobj.StateHandler
func RegisterFormat ¶
func RegisterFormat(f accessobj.FormatHandler) *formatHandler
Types ¶
type BlobSink ¶
func (*BlobSink) AddBlob ¶
func (s *BlobSink) AddBlob(blob blobaccess.BlobAccess) (string, error)
type ComponentAccessImpl ¶
type ComponentAccessImpl struct {
// contains filtered or unexported fields
}
func (*ComponentAccessImpl) Close ¶
func (c *ComponentAccessImpl) Close() error
func (*ComponentAccessImpl) GetContext ¶
func (c *ComponentAccessImpl) GetContext() cpi.Context
func (*ComponentAccessImpl) GetName ¶
func (c *ComponentAccessImpl) GetName() string
func (*ComponentAccessImpl) GetParentBridge ¶
func (c *ComponentAccessImpl) GetParentBridge() repocpi.RepositoryViewManager
func (*ComponentAccessImpl) HasVersion ¶
func (c *ComponentAccessImpl) HasVersion(vers string) (bool, error)
func (*ComponentAccessImpl) IsReadOnly ¶
func (c *ComponentAccessImpl) IsReadOnly() bool
func (*ComponentAccessImpl) ListVersions ¶
func (c *ComponentAccessImpl) ListVersions() ([]string, error)
func (*ComponentAccessImpl) LookupVersion ¶
func (c *ComponentAccessImpl) LookupVersion(version string) (*repocpi.ComponentVersionAccessInfo, error)
func (*ComponentAccessImpl) NewVersion ¶
func (c *ComponentAccessImpl) NewVersion(version string, overrides ...bool) (*repocpi.ComponentVersionAccessInfo, error)
func (*ComponentAccessImpl) SetBridge ¶
func (c *ComponentAccessImpl) SetBridge(base repocpi.ComponentAccessBridge)
type ComponentArchive ¶
type ComponentArchive struct {
// contains filtered or unexported fields
}
ComponentArchive is the go representation for a component artifact.
func New ¶
func New(ctx cpi.Context, acc accessobj.AccessMode, fs vfs.FileSystem, setup accessobj.Setup, closer accessobj.Closer, mode vfs.FileMode) (*ComponentArchive, error)
New returns a new representation based element.
func (*ComponentArchive) AsRepository ¶
func (c *ComponentArchive) AsRepository() cpi.Repository
AsRepository returns a repository view closing the archive.
func (*ComponentArchive) Close ¶
func (c *ComponentArchive) Close() error
func (*ComponentArchive) IsReadOnly ¶
func (c *ComponentArchive) IsReadOnly() bool
func (*ComponentArchive) Repository ¶
func (c *ComponentArchive) Repository() cpi.Repository
Repository returns a non referencing repository which does not close the archive.
func (*ComponentArchive) SetName ¶
func (c *ComponentArchive) SetName(n string)
func (*ComponentArchive) SetReadOnly ¶
func (c *ComponentArchive) SetReadOnly()
func (*ComponentArchive) SetVersion ¶
func (c *ComponentArchive) SetVersion(v string)
type ComponentVersionContainer ¶
type ComponentVersionContainer struct {
// contains filtered or unexported fields
}
func (*ComponentVersionContainer) AccessMethod ¶
func (c *ComponentVersionContainer) AccessMethod(a cpi.AccessSpec, cv refmgmt.ExtendedAllocatable) (cpi.AccessMethod, error)
func (*ComponentVersionContainer) AddBlob ¶
func (c *ComponentVersionContainer) AddBlob(blob cpi.BlobAccess, refName string, global cpi.AccessSpec) (cpi.AccessSpec, error)
func (*ComponentVersionContainer) Close ¶
func (c *ComponentVersionContainer) Close() error
func (*ComponentVersionContainer) GetBlob ¶
func (c *ComponentVersionContainer) GetBlob(name string) (cpi.DataAccess, error)
func (*ComponentVersionContainer) GetContext ¶
func (c *ComponentVersionContainer) GetContext() cpi.Context
func (*ComponentVersionContainer) GetDescriptor ¶
func (c *ComponentVersionContainer) GetDescriptor() *compdesc.ComponentDescriptor
func (*ComponentVersionContainer) GetInexpensiveContentVersionIdentity ¶
func (c *ComponentVersionContainer) GetInexpensiveContentVersionIdentity(a cpi.AccessSpec, cv refmgmt.ExtendedAllocatable) string
func (*ComponentVersionContainer) GetParentBridge ¶
func (c *ComponentVersionContainer) GetParentBridge() repocpi.ComponentAccessBridge
func (*ComponentVersionContainer) GetStorageContext ¶
func (c *ComponentVersionContainer) GetStorageContext() cpi.StorageContext
func (*ComponentVersionContainer) IsReadOnly ¶
func (c *ComponentVersionContainer) IsReadOnly() bool
func (*ComponentVersionContainer) Repository ¶
func (c *ComponentVersionContainer) Repository() cpi.Repository
func (*ComponentVersionContainer) SetBridge ¶
func (c *ComponentVersionContainer) SetBridge(impl repocpi.ComponentVersionAccessBridge)
func (*ComponentVersionContainer) SetDescriptor ¶
func (c *ComponentVersionContainer) SetDescriptor(cd *compdesc.ComponentDescriptor) error
func (*ComponentVersionContainer) SetReadOnly ¶
func (c *ComponentVersionContainer) SetReadOnly()
func (*ComponentVersionContainer) Update ¶
func (c *ComponentVersionContainer) Update() error
type FormatHandler ¶
type FormatHandler interface { accessio.Option Format() accessio.FileFormat Open(ctx cpi.ContextProvider, acc accessobj.AccessMode, path string, opts accessio.Options) (*Object, error) Create(ctx cpi.ContextProvider, path string, opts accessio.Options, mode vfs.FileMode) (*Object, error) Write(obj *Object, path string, opts accessio.Options, mode vfs.FileMode) error }
func GetFormat ¶
func GetFormat(name accessio.FileFormat) FormatHandler
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, ref string) (bool, error)
func (*RepositoryImpl) Get ¶
func (r *RepositoryImpl) Get() *ComponentArchive
func (*RepositoryImpl) GetComponents ¶
func (r *RepositoryImpl) GetComponents(prefix string, closure bool) ([]string, error)
func (*RepositoryImpl) GetContext ¶
func (r *RepositoryImpl) GetContext() cpi.Context
func (*RepositoryImpl) GetSpecification ¶
func (r *RepositoryImpl) GetSpecification() cpi.RepositorySpec
func (*RepositoryImpl) IsReadOnly ¶
func (r *RepositoryImpl) IsReadOnly() bool
func (*RepositoryImpl) LookupComponent ¶
func (r *RepositoryImpl) LookupComponent(name string) (*repocpi.ComponentAccessInfo, error)
func (*RepositoryImpl) NumComponents ¶
func (r *RepositoryImpl) NumComponents(prefix string) (int, error)
func (*RepositoryImpl) SetBridge ¶
func (r *RepositoryImpl) SetBridge(base repocpi.RepositoryBridge)
func (*RepositoryImpl) SetReadOnly ¶
func (r *RepositoryImpl) SetReadOnly()
type RepositorySpec ¶
type RepositorySpec struct { runtime.ObjectVersionedType `json:",inline"` accessio.StandardOptions `json:",omitempty"` // FileFormat is the format of the repository file FilePath string `json:"filePath"` // AccessMode can be set to request readonly access or creation AccessMode accessobj.AccessMode `json:"accessMode,omitempty"` }
func NewRepositorySpec ¶
func NewRepositorySpec(acc accessobj.AccessMode, filePath string, opts ...accessio.Option) (*RepositorySpec, error)
NewRepositorySpec creates a new RepositorySpec.
func (*RepositorySpec) AsUniformSpec ¶
func (a *RepositorySpec) AsUniformSpec(cpi.Context) *cpi.UniformRepositorySpec
func (*RepositorySpec) GetType ¶
func (a *RepositorySpec) GetType() string
func (*RepositorySpec) IsIntermediate ¶
func (a *RepositorySpec) IsIntermediate() bool
func (*RepositorySpec) Repository ¶
func (a *RepositorySpec) Repository(ctx cpi.Context, creds credentials.Credentials) (cpi.Repository, error)
type StateHandler ¶
type StateHandler struct{}
func (StateHandler) Decode ¶
func (i StateHandler) Decode(data []byte) (interface{}, error)
func (StateHandler) Encode ¶
func (i StateHandler) Encode(d interface{}) ([]byte, error)
func (StateHandler) Equivalent ¶
func (i StateHandler) Equivalent(a, b interface{}) bool
func (StateHandler) Initial ¶
func (i StateHandler) Initial() interface{}
Click to show internal directories.
Click to hide internal directories.