standard

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

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

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

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

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

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) UpdateVersion

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

type KeepGlobalAccessOption

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

type LocalResourcesByValueOption

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

type OmitAccessTypesOption

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

type OmitArtifactTypesOption

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

type Options

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

func (*Options) AddOmittedAccessTypes

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

func (*Options) AddOmittedArtifactTypes

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

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 (o *Options) GetOmittedAccessTypes() []string

func (*Options) GetOmittedArtifactTypes

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

func (*Options) GetResolver

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

func (*Options) GetRetries

func (o *Options) GetRetries() int

func (*Options) IsAccessTypeOmitted

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

func (*Options) IsArtifactTypeOmitted

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

func (*Options) IsKeepGlobalAccess

func (o *Options) IsKeepGlobalAccess() bool

func (*Options) IsLocalResourcesByValue

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

func (o *Options) IsSkipUpdate() bool

func (*Options) IsSourcesByValue

func (o *Options) IsSourcesByValue() bool

func (*Options) IsStopOnExistingVersion

func (o *Options) IsStopOnExistingVersion() bool

func (*Options) IsTransportEnforced

func (o *Options) IsTransportEnforced() bool

func (*Options) NewOptions

func (*Options) NewTransferHandler

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

func (*Options) SetEnforceTransport

func (o *Options) SetEnforceTransport(enforce bool)

func (*Options) SetKeepGlobalAccess

func (o *Options) SetKeepGlobalAccess(keepGlobalAccess bool)

func (*Options) SetLocalResourcesByValue

func (o *Options) SetLocalResourcesByValue(resourcesByValue bool)

func (*Options) SetOmittedAccessTypes

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

func (*Options) SetOmittedArtifactTypes

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

func (o *Options) SetRetries(retries int)

func (*Options) SetSkipUpdate

func (o *Options) SetSkipUpdate(skipupdate bool)

func (*Options) SetSourcesByValue

func (o *Options) SetSourcesByValue(sourcesByValue bool)

func (*Options) SetStopOnExistingVersion

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

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

type SkipUpdateOption

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

type SourcesByValueOption

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

type StopOnExistingVersionOption

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

Jump to

Keyboard shortcuts

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