ocm

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

View Source
const (
	KIND_COMPONENT          = internal.KIND_COMPONENT
	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
)
View Source
const CONTEXT_TYPE = internal.CONTEXT_TYPE
View Source
const CommonTransportFormat = internal.CommonTransportFormat
View Source
const (
	KIND_OCM_REFERENCE = "ocm reference"
)

Variables ¶

View Source
var ErrTempVersion = repocpi.ErrTempVersion

ErrTempVersion indicates an ignored update in the backend because the current version has not yet been added to the repository.

Functions ¶

func AcceptExistentDigests ¶ added in v0.4.1

func AcceptExistentDigests(flag ...bool) internal.ModOptionImpl

func AccessUsage ¶

func AccessUsage(scheme AccessTypeScheme, cli bool) string

func BlobAccessForAccessMethod ¶ added in v0.5.0

func CompleteModificationOptions ¶ added in v0.5.0

func CompleteModificationOptions(ctx ContextProvider, m *ModificationOptions)

func ComponentRefKey ¶ added in v0.3.0

func ComponentRefKey(ref *compdesc.ComponentReference) common.NameVersion

func DefaultContext ¶

func DefaultContext() internal.Context

DefaultContext is the default context initialized by init functions.

func IsIntermediate ¶

func IsIntermediate(spec RepositorySpec) bool

func IsNoneAccess ¶ added in v0.4.1

func IsNoneAccess(a compdesc.AccessSpec) bool

func IsNoneAccessKind ¶ added in v0.4.1

func IsNoneAccessKind(k string) 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 ModifyResource ¶ added in v0.4.1

func ModifyResource(flag ...bool) internal.ModOptionImpl

func ReferenceHint ¶ added in v0.5.0

func ReferenceHint(spec AccessSpec, cv ComponentVersionAccess) string

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 . Deprecated: use ocmutils.GetResourceReader. It must be deprecated because of the support of free-floating ReSourceAccess implementations, they not necessarily provide an AccessMethod.

func SkipDigest deprecated added in v0.4.1

func SkipDigest(flag ...bool) internal.ModOptionImpl

SkipDigest disables digest creation if enabled.

Deprecated: for legacy code, only.

func SkipVerify ¶ added in v0.4.1

func SkipVerify(flag ...bool) internal.ModOptionImpl

func UseBlobHandlers ¶ added in v0.5.0

func UseBlobHandlers(h BlobHandlerProvider) internal.BlobOptionImpl

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 WithContext ¶

func WithContext(ctx context.Context) internal.Builder

func WithCredentials ¶

func WithCredentials(ctx credentials.Context) internal.Builder

func WithDefaultHashAlgorithm ¶ added in v0.4.1

func WithDefaultHashAlgorithm(algo ...string) internal.ModOptionImpl

func WithHasherProvider ¶ added in v0.4.1

func WithHasherProvider(prov HasherProvider) internal.ModOptionImpl

func WithOCIRepositories ¶

func WithOCIRepositories(ctx oci.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 AccessProvider ¶ added in v0.4.1

type AccessProvider = internal.AccessProvider

type AccessSpec ¶

type AccessSpec = internal.AccessSpec

func GlobalAccess ¶ added in v0.5.0

func GlobalAccess(spec AccessSpec, ctx Context) 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 AddVersionOption ¶ added in v0.5.0

type AddVersionOption = internal.AddVersionOption

func Overwrite ¶ added in v0.5.0

func Overwrite(flag ...bool) AddVersionOption

Overwrite enabled the overwrite mode for adding a component version.

type AddVersionOptions ¶ added in v0.5.0

type AddVersionOptions = internal.AddVersionOptions

func NewAddVersionOptions ¶ added in v0.5.0

func NewAddVersionOptions(list ...AddVersionOption) *AddVersionOptions

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 BlobHandlerProvider ¶ added in v0.5.0

type BlobHandlerProvider = internal.BlobHandlerProvider

func DefaultBlobHandlerProvider ¶ added in v0.5.0

func DefaultBlobHandlerProvider(ctx Context) BlobHandlerProvider

type BlobHandlerRegistry ¶

type BlobHandlerRegistry = internal.BlobHandlerRegistry

func DefaultBlobHandlers ¶

func DefaultBlobHandlers() BlobHandlerRegistry

type BlobModificationOption ¶ added in v0.5.0

type BlobModificationOption = internal.BlobModificationOption

type BlobModificationOptions ¶ added in v0.5.0

type BlobModificationOptions = internal.BlobModificationOptions

func NewBlobModificationOptions ¶ added in v0.5.0

func NewBlobModificationOptions(list ...BlobModificationOption) *BlobModificationOptions

type BlobUploadOption ¶ added in v0.5.0

type BlobUploadOption = internal.BlobUploadOption

type BlobUploadOptions ¶ added in v0.5.0

type BlobUploadOptions = internal.BlobUploadOptions

func NewBlobUploadOptions ¶ added in v0.5.0

func NewBlobUploadOptions(list ...BlobUploadOption) *BlobUploadOptions

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 ParseComp ¶

func ParseComp(ref string) (CompSpec, error)

func (*CompSpec) IsVersion ¶

func (r *CompSpec) IsVersion() bool

func (*CompSpec) NameVersion ¶

func (r *CompSpec) NameVersion() common.NameVersion

func (*CompSpec) Reference ¶

func (r *CompSpec) Reference() string

func (*CompSpec) String ¶

func (r *CompSpec) String() string

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

func NoComponentVersion ¶ added in v0.5.0

func NoComponentVersion(ctx ContextProvider) ComponentVersionAccess

NoComponentVersion provides a dummy component version providing access to the context. It can be used to instantiate external access methods (not based on any component version).

type ComponentVersionContainer ¶

type ComponentVersionContainer interface {
	LookupVersion(version string) (ComponentVersionAccess, error)
}

type ComponentVersionResolver ¶

type ComponentVersionResolver = internal.ComponentVersionResolver

func NewDedicatedResolver ¶ added in v0.6.0

func NewDedicatedResolver(cv ...ComponentVersionAccess) 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 ¶

type Context = internal.Context

func DefinedForContext ¶

func DefinedForContext(ctx context.Context) (Context, bool)

func FromContext ¶ added in v0.3.0

func FromContext(ctx context.Context) Context

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 DedicatedResolver ¶ added in v0.6.0

type DedicatedResolver []ComponentVersionAccess

func (DedicatedResolver) LookupComponentVersion ¶ added in v0.6.0

func (d DedicatedResolver) LookupComponentVersion(name string, version string) (ComponentVersionAccess, error)

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 Finalizer ¶

type Finalizer interface {
	Finalize() error
}

type GenericAccessSpec ¶ added in v0.3.0

type GenericAccessSpec = internal.GenericAccessSpec

func ToGenericAccessSpec ¶ added in v0.4.1

func ToGenericAccessSpec(spec AccessSpec) (*GenericAccessSpec, error)

type GenericRepositorySpec ¶ added in v0.3.0

type GenericRepositorySpec = internal.GenericRepositorySpec

func ToGenericRepositorySpec ¶ added in v0.4.1

func ToGenericRepositorySpec(spec RepositorySpec) (*GenericRepositorySpec, error)

type Hasher ¶ added in v0.4.1

type Hasher = internal.Hasher

type HasherProvider ¶ added in v0.4.1

type HasherProvider = internal.HasherProvider

type HintProvider ¶

type HintProvider = internal.HintProvider

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 ModificationOption ¶ added in v0.4.1

type ModificationOption = internal.ModificationOption

type ModificationOptions ¶ added in v0.4.1

type ModificationOptions = internal.ModificationOptions

func NewModificationOptions ¶ added in v0.4.1

func NewModificationOptions(list ...ModificationOption) *ModificationOptions

type RefSpec ¶

type RefSpec struct {
	UniformRepositorySpec
	CompSpec
}

RefSpec is a go internal representation of a oci reference.

func ParseRef ¶

func ParseRef(ref string) (RefSpec, error)

ParseRef parses a standard ocm reference into an internal representation.

func (RefSpec) DeepCopy ¶

func (r RefSpec) DeepCopy() RefSpec

func (*RefSpec) HostPort ¶

func (r *RefSpec) HostPort() (string, string)

func (*RefSpec) IsVersion ¶

func (r *RefSpec) IsVersion() bool

func (*RefSpec) Name ¶

func (r *RefSpec) Name() string

func (*RefSpec) Reference ¶

func (r *RefSpec) Reference() string

func (*RefSpec) String ¶

func (r *RefSpec) String() string

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, create ...bool) (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

func NewResourceMeta ¶ added in v0.4.1

func NewResourceMeta(name string, typ string, relation metav1.ResourceRelation) *ResourceMeta

type Session ¶

type Session interface {
	datacontext.Session

	Finalize(Finalizer)
	LookupRepository(Context, RepositorySpec) (Repository, error)
	LookupComponent(ComponentContainer, string) (ComponentAccess, error)
	LookupComponentVersion(r ComponentVersionResolver, 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.

Directories ¶

Path Synopsis
npm
options
Package options defines standard options and option types usable to provide CLI options used to dynamically orchestrate arbitrary access specifications.
Package options defines standard options and option types usable to provide CLI options used to dynamically orchestrate arbitrary access specifications.
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.
s3
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.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
cpi
repocpi
Package repocpi contains the implementation support for repository backends.
Package repocpi contains the implementation support for repository backends.
digester
Package download provides an API for resource download handlers.
Package download provides an API for resource download handlers.
Package elements contains builders for elements of a component version, aka resources, sources and references.
Package elements contains builders for elements of a component version, aka resources, sources and references.
artifactaccess
Package artifactaccess hosts packages for ResourceAccess and SourceAccess builders used to add resources and sources referring to content in other repositories using access specification to a component version.
Package artifactaccess hosts packages for ResourceAccess and SourceAccess builders used to add resources and sources referring to content in other repositories using access specification to a component version.
artifactblob
Package artifactblob hosts packages for ResourceAccess and SourceAccess builders used to add resources and sources as local blobs to a component version.
Package artifactblob hosts packages for ResourceAccess and SourceAccess builders used to add resources and sources as local blobs to a component version.
artifactblob/externalblob
Package ociartifact provides a way to provide ResourceAccess and SourceAccess objects based on external access specification intended to be added as local access.
Package ociartifact provides a way to provide ResourceAccess and SourceAccess objects based on external access specification intended to be added as local access.
routingslip/types/plugin
Package plugin is an adapter implementation that provides a generic handling of all ValueSets provided by plugins.
Package plugin is an adapter implementation that provides a generic handling of all ValueSets provided by plugins.
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.
ppi/config
The config package can be used if the plugin should provide the ocm configuration from the calling OCM library.
The config package can be used if the plugin should provide the ocm configuration from the calling OCM library.
ppi/logging
The logging package can be used if the plugin should handle the ocm logging configuration from the calling OCM library.
The logging package can be used if the plugin should handle the ocm logging configuration from the calling OCM library.
ctf
virtual/example
Package example contains a simple implementation providing a virtual OCM repository based on some opinionated filesystem structure.
Package example contains a simple implementation providing a virtual OCM repository based on some opinionated filesystem structure.
transferhandler
Package transferhandler provides the API for transfer handlers used during the transfer process of an OCM component.
Package transferhandler provides the API for transfer handlers used during the transfer process of an OCM component.
hpi
Package hpi contains the Handler Programming Interface for value merge handlers
Package hpi contains the Handler Programming Interface for value merge handlers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL