Documentation ¶
Index ¶
- Constants
- func NewLocalFilesystemBlobAccess(path, mediaType string) (cdv2.UnstructuredTypedObject, error)
- func NewLocalRepositoryContext(baseURL string) (cdv2.UnstructuredTypedObject, error)
- func NewOCIRegistryAccess(ociImageRef string) (cdv2.UnstructuredTypedObject, error)
- func NewOCIRepositoryContext(baseURL string) (cdv2.UnstructuredTypedObject, error)
- func NewTestComponentVersionFromReader(cd *types.ComponentDescriptor) model.ComponentVersion
- type BaseFilesystemBlobResolver
- type LocalFilesystemBlobResolver
- func (ca *LocalFilesystemBlobResolver) CanResolve(resource types.Resource) bool
- func (ca *LocalFilesystemBlobResolver) Info(_ context.Context, res types.Resource) (*ctf.BlobInfo, error)
- func (ca *LocalFilesystemBlobResolver) Resolve(_ context.Context, res types.Resource, writer io.Writer) (*ctf.BlobInfo, error)
- type LocalRepository
- type TestComponentVersion
- func (t *TestComponentVersion) GetComponentDescriptor() *types.ComponentDescriptor
- func (t *TestComponentVersion) GetComponentReference(name string) *types.ComponentReference
- func (t *TestComponentVersion) GetComponentReferences() []types.ComponentReference
- func (c *TestComponentVersion) GetName() string
- func (t *TestComponentVersion) GetReferencedComponentVersion(ctx context.Context, ref *types.ComponentReference, ...) (model.ComponentVersion, error)
- func (t *TestComponentVersion) GetRepositoryContext() *types.UnstructuredTypedObject
- func (t *TestComponentVersion) GetResource(name string, identity map[string]string) (model.Resource, error)
- func (c *TestComponentVersion) GetSchemaVersion() string
- func (c *TestComponentVersion) GetVersion() string
- type TestResource
- func (r *TestResource) GetAccessType() string
- func (r *TestResource) GetName() string
- func (r *TestResource) GetResource() (*types.Resource, error)
- func (r *TestResource) GetType() string
- func (r *TestResource) GetTypedContent(ctx context.Context) (*model.TypedResourceContent, error)
- func (r *TestResource) GetVersion() string
Constants ¶
View Source
const LocalRepositoryType = "local"
LocalRepositoryType defines the local repository context type.
Variables ¶
This section is empty.
Functions ¶
func NewLocalFilesystemBlobAccess ¶ added in v0.108.0
func NewLocalFilesystemBlobAccess(path, mediaType string) (cdv2.UnstructuredTypedObject, error)
func NewLocalRepositoryContext ¶ added in v0.108.0
func NewLocalRepositoryContext(baseURL string) (cdv2.UnstructuredTypedObject, error)
func NewOCIRegistryAccess ¶ added in v0.108.0
func NewOCIRegistryAccess(ociImageRef string) (cdv2.UnstructuredTypedObject, error)
func NewOCIRepositoryContext ¶ added in v0.108.0
func NewOCIRepositoryContext(baseURL string) (cdv2.UnstructuredTypedObject, error)
func NewTestComponentVersionFromReader ¶
func NewTestComponentVersionFromReader(cd *types.ComponentDescriptor) model.ComponentVersion
NewTestComponentVersionFromReader returns a ComponentVersion for test purposes. It cannot be used to access referenced components.
Types ¶
type BaseFilesystemBlobResolver ¶ added in v0.108.0
type BaseFilesystemBlobResolver struct {
// contains filtered or unexported fields
}
BaseFilesystemBlobResolver implements a common method for filesystem.
func (*BaseFilesystemBlobResolver) ResolveFromFs ¶ added in v0.108.0
func (res *BaseFilesystemBlobResolver) ResolveFromFs(blobpath string) (*ctf.BlobInfo, io.ReadCloser, error)
ResolveFromFs resolves a blob from a given path.
type LocalFilesystemBlobResolver ¶ added in v0.108.0
type LocalFilesystemBlobResolver struct {
BaseFilesystemBlobResolver
}
LocalFilesystemBlobResolver implements the BlobResolver interface for "localFilesystemBlob" access types.
func NewLocalFilesystemBlobResolver ¶ added in v0.108.0
func NewLocalFilesystemBlobResolver(fs vfs.FileSystem) *LocalFilesystemBlobResolver
NewLocalFilesystemBlobResolver creates a new local filesystem blob resolver.
func (*LocalFilesystemBlobResolver) CanResolve ¶ added in v0.108.0
func (ca *LocalFilesystemBlobResolver) CanResolve(resource types.Resource) bool
type LocalRepository ¶ added in v0.108.0
type LocalRepository struct { cdv2.ObjectType BaseURL string `json:"baseUrl"` }
LocalRepository describes a local repository
func NewLocalRepository ¶ added in v0.108.0
func NewLocalRepository(baseUrl string) *LocalRepository
NewLocalRepository creates a new local repository
type TestComponentVersion ¶
type TestComponentVersion struct {
// contains filtered or unexported fields
}
func (*TestComponentVersion) GetComponentDescriptor ¶
func (t *TestComponentVersion) GetComponentDescriptor() *types.ComponentDescriptor
func (*TestComponentVersion) GetComponentReference ¶
func (t *TestComponentVersion) GetComponentReference(name string) *types.ComponentReference
func (*TestComponentVersion) GetComponentReferences ¶
func (t *TestComponentVersion) GetComponentReferences() []types.ComponentReference
func (*TestComponentVersion) GetName ¶
func (c *TestComponentVersion) GetName() string
func (*TestComponentVersion) GetReferencedComponentVersion ¶
func (t *TestComponentVersion) GetReferencedComponentVersion(ctx context.Context, ref *types.ComponentReference, repositoryContext *types.UnstructuredTypedObject, overwriter componentoverwrites.Overwriter) (model.ComponentVersion, error)
func (*TestComponentVersion) GetRepositoryContext ¶
func (t *TestComponentVersion) GetRepositoryContext() *types.UnstructuredTypedObject
func (*TestComponentVersion) GetResource ¶
func (*TestComponentVersion) GetSchemaVersion ¶
func (c *TestComponentVersion) GetSchemaVersion() string
func (*TestComponentVersion) GetVersion ¶
func (c *TestComponentVersion) GetVersion() string
type TestResource ¶ added in v0.108.0
type TestResource struct {
// contains filtered or unexported fields
}
func (*TestResource) GetAccessType ¶ added in v0.108.0
func (r *TestResource) GetAccessType() string
func (*TestResource) GetName ¶ added in v0.108.0
func (r *TestResource) GetName() string
func (*TestResource) GetResource ¶ added in v0.108.0
func (r *TestResource) GetResource() (*types.Resource, error)
func (*TestResource) GetType ¶ added in v0.108.0
func (r *TestResource) GetType() string
func (*TestResource) GetTypedContent ¶ added in v0.108.0
func (r *TestResource) GetTypedContent(ctx context.Context) (*model.TypedResourceContent, error)
func (*TestResource) GetVersion ¶ added in v0.108.0
func (r *TestResource) GetVersion() string
Click to show internal directories.
Click to hide internal directories.