Documentation ¶
Index ¶
- Constants
- func AccessUsage(scheme AccessTypeScheme, cli bool) string
- func ComponentRefKey(ref *compdesc.ComponentReference) common.NameVersion
- func DefaultContext() internal.Context
- func IsIntermediate(spec RepositorySpec) bool
- func IsUnknownAccessSpec(s AccessSpec) bool
- func IsUnknownRepositorySpec(s RepositorySpec) bool
- func ResourceData(s AccessMethodSource) ([]byte, error)
- func ResourceMimeReader(s AccessMethodSource) (io.ReadCloser, string, error)
- func ResourceReader(s AccessMethodSource) (io.ReadCloser, error)
- func WithAccessypeScheme(scheme AccessTypeScheme) internal.Builder
- func WithBlobDigesters(reg BlobDigesterRegistry) internal.Builder
- func WithBlobHandlers(reg BlobHandlerRegistry) internal.Builder
- func WithContext(ctx context.Context) internal.Builder
- func WithCredentials(ctx credentials.Context) internal.Builder
- func WithOCIRepositories(ctx oci.Context) internal.Builder
- func WithRepositoryDelegation(reg RepositoryDelegationRegistry) internal.Builder
- func WithRepositorySpecHandlers(reg RepositorySpecHandlers) internal.Builder
- func WithRepositoyTypeScheme(scheme RepositoryTypeScheme) internal.Builder
- type AccessMethod
- type AccessMethodSource
- type AccessSpec
- type AccessSpecRef
- type AccessType
- type AccessTypeScheme
- type BlobAccess
- type BlobDigester
- type BlobDigesterRegistry
- type BlobHandler
- type BlobHandlerRegistry
- type CompSpec
- type ComponentAccess
- type ComponentContainer
- type ComponentLister
- type ComponentReference
- type ComponentVersionAccess
- type ComponentVersionContainer
- type ComponentVersionResolver
- type CompoundResolver
- type Context
- type ContextProvider
- type DataAccess
- type DigestDescriptor
- type DigesterType
- type EvaluationResult
- type Finalizer
- type GenericAccessSpec
- type GenericRepositorySpec
- type HintProvider
- type IntermediateRepositorySpecAspect
- type LocalContextProvider
- type MatchingResolver
- type RefSpec
- type References
- type Repository
- type RepositoryDelegationRegistry
- type RepositorySpec
- type RepositorySpecHandler
- type RepositorySpecHandlers
- type RepositoryType
- type RepositoryTypeScheme
- type ResourceAccess
- type ResourceMeta
- type Session
- type SourceAccess
- type SourceMeta
- type UniformRepositorySpec
Constants ¶
const ( KIND_COMPONENTVERSION = internal.KIND_COMPONENTVERSION KIND_COMPONENTREFERENCE = "component reference" KIND_RESOURCE = internal.KIND_RESOURCE KIND_SOURCE = internal.KIND_SOURCE KIND_REFERENCE = internal.KIND_REFERENCE KIND_REPOSITORYSPEC = internal.KIND_REPOSITORYSPEC )
const CONTEXT_TYPE = internal.CONTEXT_TYPE
const CommonTransportFormat = internal.CommonTransportFormat
const (
KIND_OCM_REFERENCE = "ocm reference"
)
Variables ¶
This section is empty.
Functions ¶
func AccessUsage ¶
func AccessUsage(scheme AccessTypeScheme, cli bool) string
func ComponentRefKey ¶ added in v0.3.0
func ComponentRefKey(ref *compdesc.ComponentReference) common.NameVersion
func DefaultContext ¶
DefaultContext is the default context initialized by init functions.
func IsIntermediate ¶
func IsIntermediate(spec RepositorySpec) bool
func IsUnknownAccessSpec ¶ added in v0.3.0
func IsUnknownAccessSpec(s AccessSpec) bool
func IsUnknownRepositorySpec ¶ added in v0.3.0
func IsUnknownRepositorySpec(s RepositorySpec) bool
func ResourceData ¶
func ResourceData(s AccessMethodSource) ([]byte, error)
ResourceData extracts the data for a given resource/source access. It handles the Close contract for the access method for a singular use.
func ResourceMimeReader ¶ added in v0.3.0
func ResourceMimeReader(s AccessMethodSource) (io.ReadCloser, string, error)
ResourceMimeReader gets a Reader for a given resource/source access. It provides a Reader handling the Close contract for the access method by connecting the access method's Close method to the Readers Close method. Additionally, the mime type is returned.
func ResourceReader ¶
func ResourceReader(s AccessMethodSource) (io.ReadCloser, error)
ResourceReader gets a Reader for a given resource/source access. It provides a Reader handling the Close contract for the access method by connecting the access method's Close method to the Readers Close method .
func WithAccessypeScheme ¶
func WithAccessypeScheme(scheme AccessTypeScheme) internal.Builder
func WithBlobDigesters ¶
func WithBlobDigesters(reg BlobDigesterRegistry) internal.Builder
func WithBlobHandlers ¶
func WithBlobHandlers(reg BlobHandlerRegistry) internal.Builder
func WithCredentials ¶
func WithCredentials(ctx credentials.Context) internal.Builder
func WithRepositoryDelegation ¶ added in v0.3.0
func WithRepositoryDelegation(reg RepositoryDelegationRegistry) internal.Builder
func WithRepositorySpecHandlers ¶
func WithRepositorySpecHandlers(reg RepositorySpecHandlers) internal.Builder
func WithRepositoyTypeScheme ¶
func WithRepositoyTypeScheme(scheme RepositoryTypeScheme) internal.Builder
Types ¶
type AccessMethod ¶
type AccessMethod = internal.AccessMethod
type AccessMethodSource ¶
type AccessMethodSource = cpi.AccessMethodSource
type AccessSpec ¶
type AccessSpec = internal.AccessSpec
func NewGenericAccessSpec ¶
func NewGenericAccessSpec(spec string) (AccessSpec, error)
type AccessSpecRef ¶
type AccessSpecRef = internal.AccessSpecRef
func NewAccessSpecRef ¶
func NewAccessSpecRef(spec cpi.AccessSpec) *AccessSpecRef
func NewRawAccessSpecRef ¶
func NewRawAccessSpecRef(data []byte, unmarshaler runtime.Unmarshaler) (*AccessSpecRef, error)
type AccessType ¶
type AccessType = internal.AccessType
type AccessTypeScheme ¶
type AccessTypeScheme = internal.AccessTypeScheme
type BlobAccess ¶
type BlobAccess = internal.BlobAccess
type BlobDigester ¶
type BlobDigester = internal.BlobDigester
type BlobDigesterRegistry ¶
type BlobDigesterRegistry = internal.BlobDigesterRegistry
type BlobHandler ¶
type BlobHandler = internal.BlobHandler
type BlobHandlerRegistry ¶
type BlobHandlerRegistry = internal.BlobHandlerRegistry
func DefaultBlobHandlers ¶
func DefaultBlobHandlers() BlobHandlerRegistry
type CompSpec ¶
type CompSpec struct { // Component is the component name part of a component version Component string // +optional Version *string }
CompSpec is a go internal representation of a ocm component version name.
func (*CompSpec) NameVersion ¶
func (r *CompSpec) NameVersion() common.NameVersion
type ComponentAccess ¶
type ComponentAccess = internal.ComponentAccess
type ComponentContainer ¶
type ComponentContainer interface {
LookupComponent(name string) (ComponentAccess, error)
}
type ComponentLister ¶
type ComponentLister = internal.ComponentLister
type ComponentReference ¶
type ComponentReference = internal.ComponentReference
type ComponentVersionAccess ¶
type ComponentVersionAccess = internal.ComponentVersionAccess
type ComponentVersionContainer ¶
type ComponentVersionContainer interface {
LookupVersion(version string) (ComponentVersionAccess, error)
}
type ComponentVersionResolver ¶
type ComponentVersionResolver = internal.ComponentVersionResolver
func NewCompoundResolver ¶
func NewCompoundResolver(res ...ComponentVersionResolver) ComponentVersionResolver
type CompoundResolver ¶
type CompoundResolver struct {
// contains filtered or unexported fields
}
func (*CompoundResolver) AddResolver ¶
func (c *CompoundResolver) AddResolver(r ComponentVersionResolver)
func (*CompoundResolver) LookupComponentVersion ¶
func (c *CompoundResolver) LookupComponentVersion(name string, version string) (internal.ComponentVersionAccess, error)
type Context ¶
func FromContext ¶ added in v0.3.0
FromContext returns the Context to use for context.Context. This is either an explicit context or the default context.
func FromProvider ¶ added in v0.3.0
func FromProvider(p ContextProvider) Context
func New ¶
func New(mode ...datacontext.BuilderMode) Context
type ContextProvider ¶
type ContextProvider = internal.ContextProvider
func WrapContextProvider ¶ added in v0.3.0
func WrapContextProvider(ctx LocalContextProvider) ContextProvider
type DataAccess ¶
type DataAccess = internal.DataAccess
type DigestDescriptor ¶
type DigestDescriptor = internal.DigestDescriptor
func NewDigestDescriptor ¶
func NewDigestDescriptor(digest, hashAlgo, normAlgo string) *DigestDescriptor
type DigesterType ¶
type DigesterType = internal.DigesterType
type EvaluationResult ¶
type EvaluationResult struct { Ref RefSpec Repository Repository Component ComponentAccess Version ComponentVersionAccess }
type GenericAccessSpec ¶ added in v0.3.0
type GenericAccessSpec = internal.GenericAccessSpec
type GenericRepositorySpec ¶ added in v0.3.0
type GenericRepositorySpec = internal.GenericRepositorySpec
type HintProvider ¶
type HintProvider = internal.HintProvider
type IntermediateRepositorySpecAspect ¶
type IntermediateRepositorySpecAspect = internal.IntermediateRepositorySpecAspect
type LocalContextProvider ¶ added in v0.3.0
type LocalContextProvider = internal.LocalContextProvider
type MatchingResolver ¶ added in v0.3.0
type MatchingResolver interface { ComponentVersionResolver ContextProvider AddRule(prefix string, spec RepositorySpec, prio ...int) Finalize() error }
func NewMatchingResolver ¶ added in v0.3.0
func NewMatchingResolver(ctx ContextProvider) MatchingResolver
type RefSpec ¶
type RefSpec struct { UniformRepositorySpec CompSpec }
RefSpec is a go internal representation of a oci reference.
type References ¶ added in v0.3.0
type References = compdesc.References
type Repository ¶
type Repository = internal.Repository
func AssureTargetRepository ¶
func AssureTargetRepository(session Session, ctx Context, targetref string, opts ...interface{}) (Repository, error)
type RepositoryDelegationRegistry ¶ added in v0.3.0
type RepositoryDelegationRegistry = internal.RepositoryDelegationRegistry
func DefaultRepositoryDelegationRegistry ¶ added in v0.3.0
func DefaultRepositoryDelegationRegistry() RepositoryDelegationRegistry
func NewRepositoryDelegationRegistry ¶ added in v0.3.0
func NewRepositoryDelegationRegistry(base ...RepositoryDelegationRegistry) RepositoryDelegationRegistry
type RepositorySpec ¶
type RepositorySpec = internal.RepositorySpec
func ParseRepoToSpec ¶ added in v0.3.0
func ParseRepoToSpec(ctx Context, ref string) (RepositorySpec, error)
type RepositorySpecHandler ¶
type RepositorySpecHandler = internal.RepositorySpecHandler
type RepositorySpecHandlers ¶
type RepositorySpecHandlers = internal.RepositorySpecHandlers
type RepositoryType ¶
type RepositoryType = internal.RepositoryType
type RepositoryTypeScheme ¶
type RepositoryTypeScheme = internal.RepositoryTypeScheme
type ResourceAccess ¶
type ResourceAccess = internal.ResourceAccess
type ResourceMeta ¶
type ResourceMeta = internal.ResourceMeta
type Session ¶
type Session interface { datacontext.Session Finalize(Finalizer) LookupRepository(Context, RepositorySpec) (Repository, error) LookupComponent(ComponentContainer, string) (ComponentAccess, error) LookupComponentVersion(r Repository, comp, vers string) (ComponentVersionAccess, error) GetComponentVersion(ComponentVersionContainer, string) (ComponentVersionAccess, error) EvaluateRef(ctx Context, ref string) (*EvaluationResult, error) EvaluateComponentRef(ctx Context, ref string) (*EvaluationResult, error) EvaluateVersionRef(ctx Context, ref string) (*EvaluationResult, error) DetermineRepository(ctx Context, ref string) (Repository, UniformRepositorySpec, error) DetermineRepositoryBySpec(ctx Context, spec *UniformRepositorySpec) (Repository, error) }
func NewSession ¶
func NewSession(s datacontext.Session) Session
type SourceAccess ¶
type SourceAccess = internal.SourceAccess
type SourceMeta ¶
type SourceMeta = internal.SourceMeta
type UniformRepositorySpec ¶
type UniformRepositorySpec = internal.UniformRepositorySpec
func ParseRepo ¶
func ParseRepo(ref string) (UniformRepositorySpec, error)
ParseRepo parses a standard ocm repository reference into a internal representation.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
plugin
Package plugin is an adapter implementation that provides a generic handling of all AccessMethods provided by plugins.
|
Package plugin is an adapter implementation that provides a generic handling of all AccessMethods provided by plugins. |
Package blobhandler contains blobhandlers for handling local blobs for dedicated repository types.
|
Package blobhandler contains blobhandlers for handling local blobs for dedicated repository types. |
handlers/oci
Package oci contains sub packages for blob handler implementations for dedicated implementations of the oci go binding interface.
|
Package oci contains sub packages for blob handler implementations for dedicated implementations of the oci go binding interface. |
handlers/ocm
Package ocm contains sub packages for blob handler implementations for dedicated implementations of the default ocm go binding interface.
|
Package ocm contains sub packages for blob handler implementations for dedicated implementations of the default ocm go binding interface. |
normalizations/jsonv1
Package jsonv1 provides a normalization which uses schema specific normalizations.
|
Package jsonv1 provides a normalization which uses schema specific normalizations. |
normalizations/jsonv2
Package jsonv2 provides a normalization which is completely based on the abstract (internal) version of the component descriptor and is therefore agnostic of the final serialization format.
|
Package jsonv2 provides a normalization which is completely based on the abstract (internal) version of the component descriptor and is therefore agnostic of the final serialization format. |
versions/ocm.gardener.cloud/v3alpha1/jsonscheme
Package jsonscheme generated by go-bindata.
|
Package jsonscheme generated by go-bindata. |
versions/ocm.software/v3alpha1/jsonscheme
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../../resources/component-descriptor-ocm-v3-schema.yaml
|
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../../resources/component-descriptor-ocm-v3-schema.yaml |
versions/v2/jsonscheme
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../resources/component-descriptor-v2-schema.yaml
|
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../resources/component-descriptor-v2-schema.yaml |
support
Package support provides a standard implementation for the object type set required to implement the OCM repository interface.
|
Package support provides a standard implementation for the object type set required to implement the OCM repository interface. |
digester
|
|
Package download provides an API for resource download handlers.
|
Package download provides an API for resource download handlers. |
handlers/blueprint
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Open Component Model contributors.
|
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Open Component Model contributors. |
Package plugin maps a Go plugin interface to a technical command line interface.
|
Package plugin maps a Go plugin interface to a technical command line interface. |
cache
Package cache implements the plugin cache that contains all loaded plugins.
|
Package cache implements the plugin cache that contains all loaded plugins. |
descriptor
Package descriptor declares several structs that describe the information that formally describes the capabilities provided by each plugin.
|
Package descriptor declares several structs that describe the information that formally describes the capabilities provided by each plugin. |
ppi
Package ppi provides the plugin programming interface.
|
Package ppi provides the plugin programming interface. |