Documentation ¶
Index ¶
- func AddOmittedAccessTypes(list ...string) transferhandler.TransferOption
- func AddOmittedArtifactTypes(list ...string) transferhandler.TransferOption
- func EnforceTransport(args ...bool) transferhandler.TransferOption
- func HandleOption[I any, O any](v O, t any)
- func KeepGlobalAccess(args ...bool) transferhandler.TransferOption
- func LocalResourcesByValue(args ...bool) transferhandler.TransferOption
- func New(opts ...transferhandler.TransferOption) (transferhandler.TransferHandler, error)
- func OmitAccessTypes(list ...string) transferhandler.TransferOption
- func OmitArtifactTypes(list ...string) transferhandler.TransferOption
- func Overwrite(args ...bool) transferhandler.TransferOption
- func Recursive(args ...bool) transferhandler.TransferOption
- func Resolver(resolver ocm.ComponentVersionResolver) transferhandler.TransferOption
- func ResourcesByValue(args ...bool) transferhandler.TransferOption
- func Retries(retries int) transferhandler.TransferOption
- func SkipUpdate(args ...bool) transferhandler.TransferOption
- func SourcesByValue(args ...bool) transferhandler.TransferOption
- func StopOnExistingVersion(args ...bool) transferhandler.TransferOption
- type EnforceTransportOption
- type Handler
- func (h *Handler) EnforceTransport(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)
- func (h *Handler) GlobalAccess(ctx ocm.Context, m ocm.AccessMethod) ocm.AccessSpec
- func (h *Handler) HandleTransferResource(r ocm.ResourceAccess, m cpi.AccessMethod, hint string, ...) error
- func (h *Handler) HandleTransferSource(r ocm.SourceAccess, m cpi.AccessMethod, hint string, ...) error
- func (h *Handler) OverwriteVersion(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)
- func (h *Handler) TransferResource(src ocm.ComponentVersionAccess, a ocm.AccessSpec, r ocm.ResourceAccess) (bool, error)
- func (h *Handler) TransferSource(src ocm.ComponentVersionAccess, a ocm.AccessSpec, r ocm.SourceAccess) (bool, error)
- func (h *Handler) TransferVersion(repo ocm.Repository, src ocm.ComponentVersionAccess, ...) (ocm.ComponentVersionAccess, transferhandler.TransferHandler, error)
- func (h *Handler) UpdateVersion(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)
- type KeepGlobalAccessOption
- type LocalResourcesByValueOption
- type OmitAccessTypesOption
- type OmitArtifactTypesOption
- type Options
- func (o *Options) AddOmittedAccessTypes(list ...string)
- func (o *Options) AddOmittedArtifactTypes(list ...string)
- func (o *Options) Apply(opts ...transferhandler.TransferOption) error
- func (o *Options) ApplyTransferOption(target transferhandler.TransferOptions) error
- func (o *Options) GetOmittedAccessTypes() []string
- func (o *Options) GetOmittedArtifactTypes() []string
- func (o *Options) GetResolver() ocm.ComponentVersionResolver
- func (o *Options) GetRetries() int
- func (o *Options) IsAccessTypeOmitted(t string) bool
- func (o *Options) IsArtifactTypeOmitted(t string) bool
- func (o *Options) IsKeepGlobalAccess() bool
- func (o *Options) IsLocalResourcesByValue() bool
- func (o *Options) IsOverwrite() bool
- func (o *Options) IsRecursive() bool
- func (o *Options) IsResourcesByValue() bool
- func (o *Options) IsSkipUpdate() bool
- func (o *Options) IsSourcesByValue() bool
- func (o *Options) IsStopOnExistingVersion() bool
- func (o *Options) IsTransportEnforced() bool
- func (o *Options) NewOptions() transferhandler.TransferHandlerOptions
- func (o *Options) NewTransferHandler() (transferhandler.TransferHandler, error)
- func (o *Options) SetEnforceTransport(enforce bool)
- func (o *Options) SetKeepGlobalAccess(keepGlobalAccess bool)
- func (o *Options) SetLocalResourcesByValue(resourcesByValue bool)
- func (o *Options) SetOmittedAccessTypes(list ...string)
- func (o *Options) SetOmittedArtifactTypes(list ...string)
- func (o *Options) SetOverwrite(overwrite bool)
- func (o *Options) SetRecursive(recursive bool)
- func (o *Options) SetResolver(resolver ocm.ComponentVersionResolver)
- func (o *Options) SetResourcesByValue(resourcesByValue bool)
- func (o *Options) SetRetries(retries int)
- func (o *Options) SetSkipUpdate(skipupdate bool)
- func (o *Options) SetSourcesByValue(sourcesByValue bool)
- func (o *Options) SetStopOnExistingVersion(stopOnExistingVersion bool)
- type OverwriteOption
- type RecursiveOption
- type ResolverOption
- type ResourcesByValueOption
- type RetryOption
- type SkipUpdateOption
- type SourcesByValueOption
- type StopOnExistingVersionOption
- type TransferOptionsCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOmittedAccessTypes ¶
func AddOmittedAccessTypes(list ...string) transferhandler.TransferOption
func AddOmittedArtifactTypes ¶
func AddOmittedArtifactTypes(list ...string) transferhandler.TransferOption
func EnforceTransport ¶
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 ¶
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 ¶
func KeepGlobalAccess(args ...bool) transferhandler.TransferOption
KeepGlobalAccess enables to keep local blobs if uploaders are used to upload imported blobs.
func LocalResourcesByValue ¶
func LocalResourcesByValue(args ...bool) transferhandler.TransferOption
LocalResourcesByValue enables the transport a local (relation) resources by values instead of by-reference.
func New ¶
func New(opts ...transferhandler.TransferOption) (transferhandler.TransferHandler, error)
func OmitAccessTypes ¶
func OmitAccessTypes(list ...string) transferhandler.TransferOption
OmitAccessTypes somits the specified access types from value transport.
func OmitArtifactTypes ¶
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 ¶
func Resolver(resolver ocm.ComponentVersionResolver) transferhandler.TransferOption
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 ¶
func Retries(retries int) transferhandler.TransferOption
Retries sets the number of retries for failing update operations.
func SkipUpdate ¶
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 ¶
func StopOnExistingVersion(args ...bool) transferhandler.TransferOption
StopOnExistingVersion stops the recursion on component versions already present in target.
Types ¶
type EnforceTransportOption ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewDefaultHandler ¶
func (*Handler) EnforceTransport ¶
func (h *Handler) EnforceTransport(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)
func (*Handler) GlobalAccess ¶
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) TransferVersion ¶
func (h *Handler) TransferVersion(repo ocm.Repository, src ocm.ComponentVersionAccess, meta *compdesc.ComponentReference, tgt ocm.Repository) (ocm.ComponentVersionAccess, transferhandler.TransferHandler, error)
func (*Handler) UpdateVersion ¶
func (h *Handler) UpdateVersion(src ocm.ComponentVersionAccess, tgt ocm.ComponentVersionAccess) (bool, error)
type KeepGlobalAccessOption ¶
type OmitAccessTypesOption ¶
type OmitArtifactTypesOption ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func (*Options) AddOmittedAccessTypes ¶
func (*Options) AddOmittedArtifactTypes ¶
func (*Options) Apply ¶
func (o *Options) Apply(opts ...transferhandler.TransferOption) error
func (*Options) ApplyTransferOption ¶
func (o *Options) ApplyTransferOption(target transferhandler.TransferOptions) error
func (*Options) GetOmittedAccessTypes ¶
func (*Options) GetOmittedArtifactTypes ¶
func (*Options) GetResolver ¶
func (o *Options) GetResolver() ocm.ComponentVersionResolver
func (*Options) GetRetries ¶
func (*Options) IsAccessTypeOmitted ¶
func (*Options) IsArtifactTypeOmitted ¶
func (*Options) IsKeepGlobalAccess ¶
func (*Options) IsLocalResourcesByValue ¶
func (*Options) IsOverwrite ¶
func (*Options) IsRecursive ¶
func (*Options) IsResourcesByValue ¶
func (*Options) IsSkipUpdate ¶
func (*Options) IsSourcesByValue ¶
func (*Options) IsStopOnExistingVersion ¶
func (*Options) IsTransportEnforced ¶
func (*Options) NewOptions ¶
func (o *Options) NewOptions() transferhandler.TransferHandlerOptions
func (*Options) NewTransferHandler ¶
func (o *Options) NewTransferHandler() (transferhandler.TransferHandler, error)
func (*Options) SetEnforceTransport ¶
func (*Options) SetKeepGlobalAccess ¶
func (*Options) SetLocalResourcesByValue ¶
func (*Options) SetOmittedAccessTypes ¶
func (*Options) SetOmittedArtifactTypes ¶
func (*Options) SetOverwrite ¶
func (*Options) SetRecursive ¶
func (*Options) SetResolver ¶
func (o *Options) SetResolver(resolver ocm.ComponentVersionResolver)
func (*Options) SetResourcesByValue ¶
func (*Options) SetRetries ¶
func (*Options) SetSkipUpdate ¶
func (*Options) SetSourcesByValue ¶
func (*Options) SetStopOnExistingVersion ¶
type OverwriteOption ¶
type RecursiveOption ¶
type ResolverOption ¶
type ResolverOption interface { GetResolver() ocm.ComponentVersionResolver SetResolver(ocm.ComponentVersionResolver) }
type ResourcesByValueOption ¶
type RetryOption ¶
type SkipUpdateOption ¶
type SourcesByValueOption ¶
type TransferOptionsCreator ¶
type TransferOptionsCreator = transferhandler.SpecializedOptionsCreator[*Options, Options]