ocm

package
v0.19.1-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 41 Imported by: 5

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
	KIND_OCM_REFERENCE      = internal.KIND_OCM_REFERENCE
)
View Source
const AppendElement = internal.TargetIndex(-1)
View Source
const CONTEXT_TYPE = internal.CONTEXT_TYPE
View Source
const CommonTransportFormat = internal.CommonTransportFormat

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.

View Source
var UpdateElement = internal.UpdateElement

Functions ¶

func AcceptExistentDigests ¶

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

func AccessUsage ¶

func AccessUsage(scheme AccessTypeScheme, cli bool) string

func CompleteModificationOptions ¶

func CompleteModificationOptions(ctx ContextProvider, m *ModificationOptions)

func ComponentRefKey ¶

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

func DefaultContext ¶

func DefaultContext() internal.Context

DefaultContext is the default context initialized by init functions.

func DisableExtraIdentityDefaulting ¶ added in v0.19.1

func DisableExtraIdentityDefaulting(flag ...bool) internal.TargetOptionImpl

DisableExtraIdentityDefaulting disables the defaulting of the extra identity

func IsIntermediate ¶

func IsIntermediate(spec RepositorySpec) bool

func IsNoneAccess ¶

func IsNoneAccess(a compdesc.AccessSpec) bool

func IsNoneAccessKind ¶

func IsNoneAccessKind(k string) bool

func IsUnknownAccessSpec ¶

func IsUnknownAccessSpec(s AccessSpec) bool

func IsUnknownRepositorySpec ¶

func IsUnknownRepositorySpec(s RepositorySpec) bool

func ModifyElement ¶ added in v0.19.0

func ModifyElement(flag ...bool) internal.ElemModOptionImpl

func ModifyResource deprecated

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

Deprecated: use ModifyElement.

func ReferenceHint ¶

func ReferenceHint(spec AccessSpec, cv ComponentVersionAccess) string

func SkipDigest deprecated

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

SkipDigest disables digest creation if enabled.

Deprecated: for legacy code, only.

func SkipVerify ¶

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

func TargetIdentity ¶

func TargetIdentity(id v1.Identity) internal.TargetOptionImpl

func TargetIdentityOrCreate ¶

func TargetIdentityOrCreate(id v1.Identity) internal.TargetOptionImpl

func TargetIndex ¶

func TargetIndex(idx int) internal.TargetOptionImpl

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 ¶

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

func WithHasherProvider ¶

func WithHasherProvider(prov HasherProvider) internal.ModOptionImpl

func WithOCIRepositories ¶

func WithOCIRepositories(ctx oci.Context) 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 ¶

type AccessProvider = internal.AccessProvider

type AccessSpec ¶

type AccessSpec = internal.AccessSpec

func GlobalAccess ¶

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 ¶

type AddVersionOption = internal.AddVersionOption

func Overwrite ¶

func Overwrite(flag ...bool) AddVersionOption

Overwrite enabled the overwrite mode for adding a component version.

type AddVersionOptions ¶

type AddVersionOptions = internal.AddVersionOptions

func NewAddVersionOptions ¶

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 ¶

type BlobHandlerProvider = internal.BlobHandlerProvider

func DefaultBlobHandlerProvider ¶

func DefaultBlobHandlerProvider(ctx Context) BlobHandlerProvider

type BlobHandlerRegistry ¶

type BlobHandlerRegistry = internal.BlobHandlerRegistry

func DefaultBlobHandlers ¶

func DefaultBlobHandlers() BlobHandlerRegistry

type BlobModificationOption ¶

type BlobModificationOption = internal.BlobModificationOption

type BlobModificationOptions ¶

type BlobModificationOptions = internal.BlobModificationOptions

func NewBlobModificationOptions ¶

func NewBlobModificationOptions(list ...BlobModificationOption) *BlobModificationOptions

type BlobUploadOption ¶

type BlobUploadOption = internal.BlobUploadOption

type BlobUploadOptions ¶

type BlobUploadOptions = internal.BlobUploadOptions

func NewBlobUploadOptions ¶

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

func NewComponentReference ¶

func NewComponentReference(name, componentName, version string) *ComponentReference

type ComponentResolver ¶

type ComponentResolver = internal.ComponentResolver

type ComponentVersionAccess ¶

type ComponentVersionAccess = internal.ComponentVersionAccess

func NoComponentVersion ¶

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

type Context ¶

type Context = internal.Context

func DefinedForContext ¶

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

func FromContext ¶

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 ¶

func FromProvider(p ContextProvider) Context

func New ¶

func New(mode ...datacontext.BuilderMode) Context

type ContextProvider ¶

type ContextProvider = internal.ContextProvider

func WrapContextProvider ¶

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 ElementModificationOption ¶ added in v0.19.0

type ElementModificationOption = internal.ElementModificationOption

type ElementModificationOptions ¶ added in v0.19.0

type ElementModificationOptions = internal.ElementModificationOptions

type EvaluationResult ¶

type EvaluationResult struct {
	Ref        RefSpec
	Repository Repository
	Component  ComponentAccess
	Version    ComponentVersionAccess
}

type Finalizer ¶

type Finalizer interface {
	Finalize() error
}

type GenericAccessSpec ¶

type GenericAccessSpec = internal.GenericAccessSpec

func ToGenericAccessSpec ¶

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

type GenericRepositorySpec ¶

type GenericRepositorySpec = internal.GenericRepositorySpec

func ToGenericRepositorySpec ¶

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

type Hasher ¶

type Hasher = internal.Hasher

type HasherProvider ¶

type HasherProvider = internal.HasherProvider

type HintProvider ¶

type HintProvider = internal.HintProvider

type LocalContextProvider ¶

type LocalContextProvider = internal.LocalContextProvider

type ModificationOption ¶

type ModificationOption = internal.ModificationOption

type ModificationOptions ¶

type ModificationOptions = internal.ModificationOptions

func NewModificationOptions ¶

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 ¶

type RepositoryDelegationRegistry = internal.RepositoryDelegationRegistry

func DefaultRepositoryDelegationRegistry ¶

func DefaultRepositoryDelegationRegistry() RepositoryDelegationRegistry

type RepositorySpec ¶

type RepositorySpec = internal.RepositorySpec

func ParseRepoToSpec ¶

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

type ResolvedComponentProvider = internal.ResolvedComponentProvider

type ResourceAccess ¶

type ResourceAccess = internal.ResourceAccess

type ResourceMeta ¶

type ResourceMeta = internal.ResourceMeta

func NewResourceMeta ¶

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

type Session ¶

type Session interface {
	datacontext.Session

	Finalize(Finalizer)
	LookupRepository(Context, RepositorySpec) (Repository, error)
	LookupRepositoryForConfig(octx Context, data []byte, unmarshaler ...runtime.Unmarshaler) (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

func NewSourceMeta ¶

func NewSourceMeta(name string, typ string) *SourceMeta

type TargetElement ¶

type TargetElement = internal.TargetElement

type TargetElementOption ¶ added in v0.19.0

type TargetElementOption = internal.TargetElementOption

type TargetElementOptions ¶ added in v0.19.0

type TargetElementOptions = internal.TargetElementOptions

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
cpi
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.
extensions
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.
tools

Jump to

Keyboard shortcuts

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