standard

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOmittedAccessTypes added in v0.3.0

func AddOmittedAccessTypes(list ...string) transferhandler.TransferOption

func AddOmittedArtifactTypes added in v0.4.1

func AddOmittedArtifactTypes(list ...string) transferhandler.TransferOption

func EnforceTransport added in v0.7.0

func EnforceTransport(args ...bool) transferhandler.TransferOption

EnforceTransport enforces a transport of a component version as it is. This controls whether transport is carried out as if the component version were not present at the destination.

func HandleOption added in v0.7.0

func HandleOption[I any, O any](v O, t any)

HandleOption handles an option value (O) to be transferred to an options object (t) using the setter method provided by interface (I). To be transferred the options object must implement interface I and the option value must not be the zero value. The function handles teo cases:

  • a pointer variable to the option value (transferred if pointer is not nil)
  • a value variable (transferred if not zero).

func KeepGlobalAccess added in v0.3.0

func KeepGlobalAccess(args ...bool) transferhandler.TransferOption

KeepGlobalAccess enables to keep local blobs if uploaders are used to upload imported blobs.

func LocalResourcesByValue added in v0.3.0

func LocalResourcesByValue(args ...bool) transferhandler.TransferOption

LocalResourcesByValue enables the transport a local (relation) resources by values instead of by-reference.

func OmitAccessTypes added in v0.3.0

func OmitAccessTypes(list ...string) transferhandler.TransferOption

OmitAccessTypes somits the specified access types from value transport.

func OmitArtifactTypes added in v0.4.1

func OmitArtifactTypes(list ...string) transferhandler.TransferOption

OmitArtifactTypes somits the specified artifact types from value transport.

func Overwrite

func Overwrite(args ...bool) transferhandler.TransferOption

Overwrite enables the modification of digest relevant information in a component version.

func Recursive

func Recursive(args ...bool) transferhandler.TransferOption

Recursive enables the transport of the reference closure of a component version.

func Resolver

Resolver specifies a resolver used to resolve nested component versions.

func ResourcesByValue

func ResourcesByValue(args ...bool) transferhandler.TransferOption

ResourcesByValue enables the transport a resources by values instead of by-reference.

func Retries added in v0.4.1

func Retries(retries int) transferhandler.TransferOption

Retries sets the number of retries for failing update operations.

func SkipUpdate added in v0.4.1

func SkipUpdate(args ...bool) transferhandler.TransferOption

SkipUpdate enables the modification of non-digest (volatile) relevant information in a component version.

func SourcesByValue

func SourcesByValue(args ...bool) transferhandler.TransferOption

SourcesByValue enables the transport a sources by values instead of by-reference.

func StopOnExistingVersion added in v0.3.0

func StopOnExistingVersion(args ...bool) transferhandler.TransferOption

StopOnExistingVersion stops the recursion on component versions already present in target.

Types

type EnforceTransportOption added in v0.7.0

type EnforceTransportOption interface {
	SetEnforceTransport(bool)
	IsTransportEnforced() bool
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewDefaultHandler

func NewDefaultHandler(opts *Options) *Handler

func (*Handler) EnforceTransport added in v0.7.0

func (h *Handler) EnforceTransport(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)

func (*Handler) GlobalAccess added in v0.3.0

func (h *Handler) GlobalAccess(ctx ocm.Context, m ocm.AccessMethod) ocm.AccessSpec

func (*Handler) HandleTransferResource

func (h *Handler) HandleTransferResource(r ocm.ResourceAccess, m cpi.AccessMethod, hint string, t ocm.ComponentVersionAccess) error

func (*Handler) HandleTransferSource

func (h *Handler) HandleTransferSource(r ocm.SourceAccess, m cpi.AccessMethod, hint string, t ocm.ComponentVersionAccess) error

func (*Handler) OverwriteVersion

func (h *Handler) OverwriteVersion(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)

func (*Handler) TransferResource

func (h *Handler) TransferResource(src ocm.ComponentVersionAccess, a ocm.AccessSpec, r ocm.ResourceAccess) (bool, error)

func (*Handler) TransferSource

func (h *Handler) TransferSource(src ocm.ComponentVersionAccess, a ocm.AccessSpec, r ocm.SourceAccess) (bool, error)

func (*Handler) UpdateVersion added in v0.4.1

func (h *Handler) UpdateVersion(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)

type KeepGlobalAccessOption added in v0.3.0

type KeepGlobalAccessOption interface {
	SetKeepGlobalAccess(bool)
	IsKeepGlobalAccess() bool
}

type LocalResourcesByValueOption added in v0.3.0

type LocalResourcesByValueOption interface {
	SetLocalResourcesByValue(bool)
	IsLocalResourcesByValue() bool
}

type OmitAccessTypesOption added in v0.3.0

type OmitAccessTypesOption interface {
	SetOmittedAccessTypes(...string)
	GetOmittedAccessTypes() []string
}

type OmitArtifactTypesOption added in v0.4.1

type OmitArtifactTypesOption interface {
	SetOmittedArtifactTypes(...string)
	GetOmittedArtifactTypes() []string
}

type Options

type Options struct {
	// contains filtered or unexported fields
}

func (*Options) AddOmittedAccessTypes added in v0.4.1

func (o *Options) AddOmittedAccessTypes(list ...string)

func (*Options) AddOmittedArtifactTypes added in v0.4.1

func (o *Options) AddOmittedArtifactTypes(list ...string)

func (*Options) Apply added in v0.3.0

func (o *Options) Apply(opts ...transferhandler.TransferOption) error

func (*Options) ApplyTransferOption added in v0.3.0

func (o *Options) ApplyTransferOption(target transferhandler.TransferOptions) error

func (*Options) GetOmittedAccessTypes added in v0.3.0

func (o *Options) GetOmittedAccessTypes() []string

func (*Options) GetOmittedArtifactTypes added in v0.4.1

func (o *Options) GetOmittedArtifactTypes() []string

func (*Options) GetResolver

func (o *Options) GetResolver() ocm.ComponentVersionResolver

func (*Options) GetRetries added in v0.4.1

func (o *Options) GetRetries() int

func (*Options) IsAccessTypeOmitted added in v0.3.0

func (o *Options) IsAccessTypeOmitted(t string) bool

func (*Options) IsArtifactTypeOmitted added in v0.4.1

func (o *Options) IsArtifactTypeOmitted(t string) bool

func (*Options) IsKeepGlobalAccess added in v0.3.0

func (o *Options) IsKeepGlobalAccess() bool

func (*Options) IsLocalResourcesByValue added in v0.3.0

func (o *Options) IsLocalResourcesByValue() bool

func (*Options) IsOverwrite

func (o *Options) IsOverwrite() bool

func (*Options) IsRecursive

func (o *Options) IsRecursive() bool

func (*Options) IsResourcesByValue

func (o *Options) IsResourcesByValue() bool

func (*Options) IsSkipUpdate added in v0.4.1

func (o *Options) IsSkipUpdate() bool

func (*Options) IsSourcesByValue

func (o *Options) IsSourcesByValue() bool

func (*Options) IsStopOnExistingVersion added in v0.3.0

func (o *Options) IsStopOnExistingVersion() bool

func (*Options) IsTransportEnforced added in v0.7.0

func (o *Options) IsTransportEnforced() bool

func (*Options) NewOptions added in v0.4.0

func (*Options) NewTransferHandler added in v0.4.0

func (o *Options) NewTransferHandler() (transferhandler.TransferHandler, error)

func (*Options) SetEnforceTransport added in v0.7.0

func (o *Options) SetEnforceTransport(enforce bool)

func (*Options) SetKeepGlobalAccess added in v0.3.0

func (o *Options) SetKeepGlobalAccess(keepGlobalAccess bool)

func (*Options) SetLocalResourcesByValue added in v0.3.0

func (o *Options) SetLocalResourcesByValue(resourcesByValue bool)

func (*Options) SetOmittedAccessTypes added in v0.3.0

func (o *Options) SetOmittedAccessTypes(list ...string)

func (*Options) SetOmittedArtifactTypes added in v0.4.1

func (o *Options) SetOmittedArtifactTypes(list ...string)

func (*Options) SetOverwrite

func (o *Options) SetOverwrite(overwrite bool)

func (*Options) SetRecursive

func (o *Options) SetRecursive(recursive bool)

func (*Options) SetResolver

func (o *Options) SetResolver(resolver ocm.ComponentVersionResolver)

func (*Options) SetResourcesByValue

func (o *Options) SetResourcesByValue(resourcesByValue bool)

func (*Options) SetRetries added in v0.4.1

func (o *Options) SetRetries(retries int)

func (*Options) SetSkipUpdate added in v0.4.1

func (o *Options) SetSkipUpdate(skipupdate bool)

func (*Options) SetSourcesByValue

func (o *Options) SetSourcesByValue(sourcesByValue bool)

func (*Options) SetStopOnExistingVersion added in v0.3.0

func (o *Options) SetStopOnExistingVersion(stopOnExistingVersion bool)

type OverwriteOption

type OverwriteOption interface {
	SetOverwrite(bool)
	IsOverwrite() bool
}

type RecursiveOption

type RecursiveOption interface {
	SetRecursive(bool)
	IsRecursive() bool
}

type ResolverOption

type ResolverOption interface {
	GetResolver() ocm.ComponentVersionResolver
	SetResolver(ocm.ComponentVersionResolver)
}

type ResourcesByValueOption

type ResourcesByValueOption interface {
	SetResourcesByValue(bool)
	IsResourcesByValue() bool
}

type RetryOption added in v0.4.1

type RetryOption interface {
	SetRetries(n int)
	GetRetries() int
}

type SkipUpdateOption added in v0.4.1

type SkipUpdateOption interface {
	SetSkipUpdate(bool)
	IsSkipUpdate() bool
}

type SourcesByValueOption

type SourcesByValueOption interface {
	SetSourcesByValue(bool)
	IsSourcesByValue() bool
}

type StopOnExistingVersionOption added in v0.3.0

type StopOnExistingVersionOption interface {
	SetStopOnExistingVersion(bool)
	IsStopOnExistingVersion() bool
}

type TransferOptionsCreator added in v0.4.0

type TransferOptionsCreator = transferhandler.SpecializedOptionsCreator[*Options, Options]

Jump to

Keyboard shortcuts

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