Documentation ¶
Index ¶
- Constants
- Variables
- func GetFormats() []string
- func NewRepository(ctx cpi.Context, 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
- 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) 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) LookupComponent(name string) (*repocpi.ComponentAccessInfo, error)
- func (r *RepositoryImpl) NumComponents(prefix string) (int, error)
- func (r *RepositoryImpl) SetBridge(base repocpi.RepositoryBridge)
- type RepositorySpec
- type StateHandler
Constants ¶
View Source
const ( Type = "ComponentArchive" TypeV1 = Type + runtime.VersionSeparator + "v1" )
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(ctx cpi.Context, 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 ¶ added in v0.3.0
func (*BlobSink) AddBlob ¶ added in v0.3.0
func (s *BlobSink) AddBlob(blob blobaccess.BlobAccess) (string, error)
type ComponentAccessImpl ¶ added in v0.3.0
type ComponentAccessImpl struct {
// contains filtered or unexported fields
}
func (*ComponentAccessImpl) Close ¶ added in v0.5.0
func (c *ComponentAccessImpl) Close() error
func (*ComponentAccessImpl) GetContext ¶ added in v0.5.0
func (c *ComponentAccessImpl) GetContext() cpi.Context
func (*ComponentAccessImpl) GetName ¶ added in v0.5.0
func (c *ComponentAccessImpl) GetName() string
func (*ComponentAccessImpl) GetParentBridge ¶ added in v0.5.0
func (c *ComponentAccessImpl) GetParentBridge() repocpi.RepositoryViewManager
func (*ComponentAccessImpl) HasVersion ¶ added in v0.3.0
func (c *ComponentAccessImpl) HasVersion(vers string) (bool, error)
func (*ComponentAccessImpl) IsReadOnly ¶ added in v0.4.1
func (c *ComponentAccessImpl) IsReadOnly() bool
func (*ComponentAccessImpl) ListVersions ¶ added in v0.3.0
func (c *ComponentAccessImpl) ListVersions() ([]string, error)
func (*ComponentAccessImpl) LookupVersion ¶ added in v0.3.0
func (c *ComponentAccessImpl) LookupVersion(version string) (*repocpi.ComponentVersionAccessInfo, error)
func (*ComponentAccessImpl) NewVersion ¶ added in v0.3.0
func (c *ComponentAccessImpl) NewVersion(version string, overrides ...bool) (*repocpi.ComponentVersionAccessInfo, error)
func (*ComponentAccessImpl) SetBridge ¶ added in v0.5.0
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 ¶ added in v0.4.1
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) SetVersion ¶
func (c *ComponentArchive) SetVersion(v string)
type ComponentVersionContainer ¶ added in v0.5.0
type ComponentVersionContainer struct {
// contains filtered or unexported fields
}
func (*ComponentVersionContainer) AccessMethod ¶ added in v0.5.0
func (c *ComponentVersionContainer) AccessMethod(a cpi.AccessSpec, cv refmgmt.ExtendedAllocatable) (cpi.AccessMethod, error)
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) Close ¶ added in v0.5.0
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 ¶ added in v0.5.0
func (c *ComponentVersionContainer) GetContext() cpi.Context
func (*ComponentVersionContainer) GetDescriptor ¶ added in v0.5.0
func (c *ComponentVersionContainer) GetDescriptor() *compdesc.ComponentDescriptor
func (*ComponentVersionContainer) GetInexpensiveContentVersionIdentity ¶ added in v0.5.0
func (c *ComponentVersionContainer) GetInexpensiveContentVersionIdentity(a cpi.AccessSpec, cv refmgmt.ExtendedAllocatable) string
func (*ComponentVersionContainer) GetParentBridge ¶ added in v0.5.0
func (c *ComponentVersionContainer) GetParentBridge() repocpi.ComponentAccessBridge
func (*ComponentVersionContainer) GetStorageContext ¶ added in v0.5.0
func (c *ComponentVersionContainer) GetStorageContext() cpi.StorageContext
func (*ComponentVersionContainer) IsReadOnly ¶ added in v0.5.0
func (c *ComponentVersionContainer) IsReadOnly() bool
func (*ComponentVersionContainer) Repository ¶ added in v0.5.0
func (c *ComponentVersionContainer) Repository() cpi.Repository
func (*ComponentVersionContainer) SetBridge ¶ added in v0.5.0
func (c *ComponentVersionContainer) SetBridge(impl repocpi.ComponentVersionAccessBridge)
func (*ComponentVersionContainer) SetDescriptor ¶ added in v0.5.0
func (c *ComponentVersionContainer) SetDescriptor(cd *compdesc.ComponentDescriptor) error
func (*ComponentVersionContainer) Update ¶ added in v0.5.0
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 ¶ added in v0.3.0
type RepositoryImpl struct {
// contains filtered or unexported fields
}
func (*RepositoryImpl) Close ¶ added in v0.5.0
func (r *RepositoryImpl) Close() error
func (*RepositoryImpl) ComponentLister ¶ added in v0.3.0
func (r *RepositoryImpl) ComponentLister() cpi.ComponentLister
func (*RepositoryImpl) ExistsComponentVersion ¶ added in v0.3.0
func (r *RepositoryImpl) ExistsComponentVersion(name string, ref string) (bool, error)
func (*RepositoryImpl) Get ¶ added in v0.3.0
func (r *RepositoryImpl) Get() *ComponentArchive
func (*RepositoryImpl) GetComponents ¶ added in v0.3.0
func (r *RepositoryImpl) GetComponents(prefix string, closure bool) ([]string, error)
func (*RepositoryImpl) GetContext ¶ added in v0.5.0
func (r *RepositoryImpl) GetContext() cpi.Context
func (*RepositoryImpl) GetSpecification ¶ added in v0.3.0
func (r *RepositoryImpl) GetSpecification() cpi.RepositorySpec
func (*RepositoryImpl) LookupComponent ¶ added in v0.3.0
func (r *RepositoryImpl) LookupComponent(name string) (*repocpi.ComponentAccessInfo, error)
func (*RepositoryImpl) NumComponents ¶ added in v0.3.0
func (r *RepositoryImpl) NumComponents(prefix string) (int, error)
func (*RepositoryImpl) SetBridge ¶ added in v0.5.0
func (r *RepositoryImpl) SetBridge(base repocpi.RepositoryBridge)
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.