Documentation ¶
Index ¶
- Constants
- Variables
- func ArtifactNameHint(spec AccessSpec, cv ComponentVersionAccess) string
- func BlobHandlerLogger(ctx Context, messageContext ...logging.MessageContext) logging.Logger
- func DefaultContext() internal.Context
- func ErrComponentVersionNotFound(name, version string) error
- func ErrComponentVersionNotFoundWrap(err error, name, version string) error
- func MarshalConvertedAccessSpec(ctx Context, s AccessSpec) ([]byte, error)
- func MustRegisterDigester(digester BlobDigester, arttypes ...string)
- func NewRepositoryType(name string, proto internal.RepositorySpec, ...) internal.RepositoryType
- func RegisterAccessType(atype AccessType)
- func RegisterBlobHandler(handler BlobHandler, opts ...BlobHandlerOption)
- func RegisterBlobHandlerRegistrationHandler(path string, handler BlobHandlerRegistrationHandler)
- func RegisterOCIImplementation(impl OCISpecFunction)
- func RegisterRepositorySpecHandler(handler RepositorySpecHandler, types ...string)
- func RegisterRepositoryType(name string, atype RepositoryType)
- func RepositoryPrefix(spec RepositorySpec) string
- func ResourceData(s AccessMethodSource) ([]byte, error)
- func ResourceReader(s AccessMethodSource) (io.ReadCloser, error)
- func ResourceReaderForMethod(meth AccessMethod) (io.ReadCloser, error)
- type AccessMethod
- type AccessMethodSource
- type AccessMethodSupport
- type AccessSpec
- type AccessSpecConverter
- type AccessSpecOptionTarget
- type AccessSpecRef
- type AccessSpecTypeOption
- type AccessSpecVersion
- type AccessType
- type BlobAccess
- type BlobDigester
- type BlobDigesterRegistry
- type BlobHandler
- type BlobHandlerConfig
- type BlobHandlerOption
- type BlobHandlerOptions
- type BlobHandlerRegistrationHandler
- type BlobHandlerRegistry
- type ComponentAccess
- type ComponentLister
- type ComponentReference
- type ComponentVersionAccess
- type ComponentVersionResolver
- type Context
- type ContextProvider
- type ConvertedAccessType
- type DataAccess
- type DefaultRepositoryType
- type DefaultStorageContext
- func (c *DefaultStorageContext) GetContext() internal.Context
- func (c *DefaultStorageContext) GetImplementationRepositoryType() ImplementationRepositoryType
- func (c *DefaultStorageContext) TargetComponentRepository() internal.Repository
- func (c *DefaultStorageContext) TargetComponentVersion() internal.ComponentVersionAccess
- type DigestDescriptor
- type DigesterType
- type DummyComponentVersionAccess
- func (d *DummyComponentVersionAccess) AccessMethod(spec AccessSpec) (AccessMethod, error)
- func (d *DummyComponentVersionAccess) AddBlob(blob BlobAccess, arttype, refName string, global AccessSpec) (AccessSpec, error)
- func (d *DummyComponentVersionAccess) AdjustResourceAccess(meta *internal.ResourceMeta, acc compdesc.AccessSpec) error
- func (d *DummyComponentVersionAccess) Close() error
- func (d *DummyComponentVersionAccess) DiscardChanges()
- func (d *DummyComponentVersionAccess) Dup() (ComponentVersionAccess, error)
- func (d *DummyComponentVersionAccess) GetContext() Context
- func (d *DummyComponentVersionAccess) GetDescriptor() *compdesc.ComponentDescriptor
- func (d *DummyComponentVersionAccess) GetName() string
- func (d *DummyComponentVersionAccess) GetReference(meta metav1.Identity) (ComponentReference, error)
- func (d *DummyComponentVersionAccess) GetReferenceByIndex(i int) (ComponentReference, error)
- func (d *DummyComponentVersionAccess) GetResource(meta metav1.Identity) (ResourceAccess, error)
- func (d *DummyComponentVersionAccess) GetResourceByIndex(i int) (ResourceAccess, error)
- func (d *DummyComponentVersionAccess) GetResources() []ResourceAccess
- func (d *DummyComponentVersionAccess) GetSource(meta metav1.Identity) (SourceAccess, error)
- func (d *DummyComponentVersionAccess) GetSourceByIndex(i int) (SourceAccess, error)
- func (d *DummyComponentVersionAccess) GetSources() []SourceAccess
- func (d *DummyComponentVersionAccess) GetVersion() string
- func (c *DummyComponentVersionAccess) Repository() Repository
- func (d *DummyComponentVersionAccess) SetReference(ref *ComponentReference) error
- func (d *DummyComponentVersionAccess) SetResource(meta *ResourceMeta, spec compdesc.AccessSpec) error
- func (d *DummyComponentVersionAccess) SetResourceBlob(meta *ResourceMeta, blob BlobAccess, refname string, global AccessSpec) error
- func (d *DummyComponentVersionAccess) SetSource(meta *SourceMeta, spec compdesc.AccessSpec) error
- func (d *DummyComponentVersionAccess) SetSourceBlob(meta *SourceMeta, blob BlobAccess, refname string, global AccessSpec) error
- type GenericAccessSpec
- type GenericRepositorySpec
- type HintProvider
- type ImplementationRepositoryType
- type IntermediateRepositorySpecAspect
- type NamePath
- type OCISpecFunction
- type PrefixProvider
- type Repository
- type RepositoryAccessMethodChecker
- type RepositorySpec
- type RepositorySpecHandler
- type RepositorySpecHandlers
- type RepositoryType
- type RepositoryTypeScheme
- type ResourceAccess
- type ResourceMeta
- type SourceAccess
- type SourceMeta
- type StorageContext
- type UniformRepositorySpec
Constants ¶
View Source
const ( KIND_COMPONENTVERSION = internal.KIND_COMPONENTVERSION KIND_RESOURCE = internal.KIND_RESOURCE KIND_SOURCE = internal.KIND_SOURCE KIND_REFERENCE = internal.KIND_REFERENCE )
View Source
const CONTEXT_TYPE = internal.CONTEXT_TYPE
View Source
const CommonTransportFormat = internal.CommonTransportFormat
Variables ¶
View Source
var TAG_BLOBHANDLER = logging.NewTag("blobhandler")
Functions ¶
func ArtifactNameHint ¶
func ArtifactNameHint(spec AccessSpec, cv ComponentVersionAccess) string
func BlobHandlerLogger ¶
func BlobHandlerLogger(ctx Context, messageContext ...logging.MessageContext) logging.Logger
func DefaultContext ¶
func MarshalConvertedAccessSpec ¶
func MarshalConvertedAccessSpec(ctx Context, s AccessSpec) ([]byte, error)
func MustRegisterDigester ¶
func MustRegisterDigester(digester BlobDigester, arttypes ...string)
func NewRepositoryType ¶
func NewRepositoryType(name string, proto internal.RepositorySpec, checker RepositoryAccessMethodChecker) internal.RepositoryType
func RegisterAccessType ¶
func RegisterAccessType(atype AccessType)
func RegisterBlobHandler ¶
func RegisterBlobHandler(handler BlobHandler, opts ...BlobHandlerOption)
func RegisterBlobHandlerRegistrationHandler ¶
func RegisterBlobHandlerRegistrationHandler(path string, handler BlobHandlerRegistrationHandler)
func RegisterOCIImplementation ¶
func RegisterOCIImplementation(impl OCISpecFunction)
func RegisterRepositorySpecHandler ¶
func RegisterRepositorySpecHandler(handler RepositorySpecHandler, types ...string)
func RegisterRepositoryType ¶
func RegisterRepositoryType(name string, atype RepositoryType)
func RepositoryPrefix ¶
func RepositoryPrefix(spec RepositorySpec) string
func ResourceData ¶
func ResourceData(s AccessMethodSource) ([]byte, error)
ResourceData extracts the data for a given resource/source access. It handles the Close contract for the access method for a singular use.
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 .
func ResourceReaderForMethod ¶
func ResourceReaderForMethod(meth AccessMethod) (io.ReadCloser, error)
Types ¶
type AccessMethod ¶
type AccessMethod = internal.AccessMethod
type AccessMethodSource ¶
type AccessMethodSource interface {
AccessMethod() (AccessMethod, error)
}
type AccessMethodSupport ¶
type AccessMethodSupport = internal.AccessMethodSupport
type AccessSpec ¶
type AccessSpec = internal.AccessSpec
type AccessSpecConverter ¶
type AccessSpecConverter interface { ConvertFrom(object internal.AccessSpec) (runtime.TypedObject, error) ConvertTo(object interface{}) (internal.AccessSpec, error) }
type AccessSpecOptionTarget ¶
type AccessSpecOptionTarget interface { SetFormat(string) SetDescription(string) SetConfigHandler(flagsets.ConfigOptionTypeSetHandler) }
type AccessSpecRef ¶
type AccessSpecRef = internal.AccessSpecRef
func NewAccessSpecRef ¶
func NewAccessSpecRef(spec AccessSpec) *AccessSpecRef
func NewRawAccessSpecRef ¶
func NewRawAccessSpecRef(data []byte, unmarshaler runtime.Unmarshaler) (*AccessSpecRef, error)
type AccessSpecTypeOption ¶
type AccessSpecTypeOption interface {
ApplyToAccessSpecOptionTarget(AccessSpecOptionTarget)
}
func WithConfigHandler ¶
func WithConfigHandler(value flagsets.ConfigOptionTypeSetHandler) AccessSpecTypeOption
func WithDescription ¶
func WithDescription(value string) AccessSpecTypeOption
func WithFormatSpec ¶
func WithFormatSpec(value string) AccessSpecTypeOption
type AccessSpecVersion ¶
type AccessSpecVersion interface { AccessSpecConverter runtime.TypedObjectDecoder CreateData() interface{} }
func NewAccessSpecVersion ¶
func NewAccessSpecVersion(proto runtime.TypedObject, converter AccessSpecConverter) AccessSpecVersion
type AccessType ¶
type AccessType = internal.AccessType
func NewAccessSpecType ¶
func NewAccessSpecType(name string, proto internal.AccessSpec, opts ...AccessSpecTypeOption) AccessType
type BlobAccess ¶
type BlobAccess = internal.BlobAccess
type BlobDigester ¶
type BlobDigester = internal.BlobDigester
type BlobDigesterRegistry ¶
type BlobDigesterRegistry = internal.BlobDigesterRegistry
func DefaultBlobDigesterRegistry ¶
func DefaultBlobDigesterRegistry() BlobDigesterRegistry
type BlobHandler ¶
type BlobHandler = internal.BlobHandler
type BlobHandlerConfig ¶
type BlobHandlerConfig = internal.BlobHandlerConfig
type BlobHandlerOption ¶
type BlobHandlerOption = internal.BlobHandlerOption
func ForArtifactType ¶
func ForArtifactType(arttype string) BlobHandlerOption
func ForMimeType ¶
func ForMimeType(mimetype string) BlobHandlerOption
func ForRepo ¶
func ForRepo(ctxtype, repostype string) BlobHandlerOption
func WithPrio ¶
func WithPrio(p int) BlobHandlerOption
type BlobHandlerOptions ¶
type BlobHandlerOptions = internal.BlobHandlerOptions
func NewBlobHandlerOptions ¶
func NewBlobHandlerOptions(olist ...BlobHandlerOption) *BlobHandlerOptions
type BlobHandlerRegistrationHandler ¶
type BlobHandlerRegistrationHandler = internal.BlobHandlerRegistrationHandler
type BlobHandlerRegistry ¶
type BlobHandlerRegistry = internal.BlobHandlerRegistry
type ComponentAccess ¶
type ComponentAccess = internal.ComponentAccess
type ComponentLister ¶
type ComponentLister = internal.ComponentLister
type ComponentReference ¶
type ComponentReference = internal.ComponentReference
type ComponentVersionAccess ¶
type ComponentVersionAccess = internal.ComponentVersionAccess
type ComponentVersionResolver ¶
type ComponentVersionResolver = internal.ComponentVersionResolver
type ContextProvider ¶
type ContextProvider = internal.ContextProvider
type ConvertedAccessType ¶
type ConvertedAccessType struct { AccessSpecVersion // contains filtered or unexported fields }
func NewConvertedAccessSpecType ¶
func NewConvertedAccessSpecType(name string, v AccessSpecVersion, opts ...AccessSpecTypeOption) *ConvertedAccessType
func (*ConvertedAccessType) ConfigOptionTypeSetHandler ¶
func (t *ConvertedAccessType) ConfigOptionTypeSetHandler() flagsets.ConfigOptionTypeSetHandler
func (*ConvertedAccessType) Description ¶
func (t *ConvertedAccessType) Description() string
func (*ConvertedAccessType) Encode ¶
func (t *ConvertedAccessType) Encode(obj runtime.TypedObject, m runtime.Marshaler) ([]byte, error)
type DataAccess ¶
type DataAccess = internal.DataAccess
type DefaultRepositoryType ¶
type DefaultRepositoryType struct { runtime.ObjectVersionedType runtime.TypedObjectDecoder // contains filtered or unexported fields }
func (*DefaultRepositoryType) LocalSupportForAccessSpec ¶
func (t *DefaultRepositoryType) LocalSupportForAccessSpec(ctx internal.Context, a compdesc.AccessSpec) bool
type DefaultStorageContext ¶
type DefaultStorageContext struct { ComponentRepository Repository ComponentVersion ComponentVersionAccess ImplementationRepositoryType ImplementationRepositoryType }
func NewDefaultStorageContext ¶
func NewDefaultStorageContext(repo Repository, vers ComponentVersionAccess, reptype ImplementationRepositoryType) *DefaultStorageContext
func (*DefaultStorageContext) GetContext ¶
func (c *DefaultStorageContext) GetContext() internal.Context
func (*DefaultStorageContext) GetImplementationRepositoryType ¶
func (c *DefaultStorageContext) GetImplementationRepositoryType() ImplementationRepositoryType
func (*DefaultStorageContext) TargetComponentRepository ¶
func (c *DefaultStorageContext) TargetComponentRepository() internal.Repository
func (*DefaultStorageContext) TargetComponentVersion ¶
func (c *DefaultStorageContext) TargetComponentVersion() internal.ComponentVersionAccess
type DigestDescriptor ¶
type DigestDescriptor = internal.DigestDescriptor
func NewDigestDescriptor ¶
func NewDigestDescriptor(digest string, typ DigesterType) *DigestDescriptor
type DigesterType ¶
type DigesterType = internal.DigesterType
type DummyComponentVersionAccess ¶
type DummyComponentVersionAccess struct {
Context Context
}
func (*DummyComponentVersionAccess) AccessMethod ¶
func (d *DummyComponentVersionAccess) AccessMethod(spec AccessSpec) (AccessMethod, error)
func (*DummyComponentVersionAccess) AddBlob ¶
func (d *DummyComponentVersionAccess) AddBlob(blob BlobAccess, arttype, refName string, global AccessSpec) (AccessSpec, error)
func (*DummyComponentVersionAccess) AdjustResourceAccess ¶
func (d *DummyComponentVersionAccess) AdjustResourceAccess(meta *internal.ResourceMeta, acc compdesc.AccessSpec) error
func (*DummyComponentVersionAccess) Close ¶
func (d *DummyComponentVersionAccess) Close() error
func (*DummyComponentVersionAccess) DiscardChanges ¶
func (d *DummyComponentVersionAccess) DiscardChanges()
func (*DummyComponentVersionAccess) Dup ¶
func (d *DummyComponentVersionAccess) Dup() (ComponentVersionAccess, error)
func (*DummyComponentVersionAccess) GetContext ¶
func (d *DummyComponentVersionAccess) GetContext() Context
func (*DummyComponentVersionAccess) GetDescriptor ¶
func (d *DummyComponentVersionAccess) GetDescriptor() *compdesc.ComponentDescriptor
func (*DummyComponentVersionAccess) GetName ¶
func (d *DummyComponentVersionAccess) GetName() string
func (*DummyComponentVersionAccess) GetReference ¶
func (d *DummyComponentVersionAccess) GetReference(meta metav1.Identity) (ComponentReference, error)
func (*DummyComponentVersionAccess) GetReferenceByIndex ¶
func (d *DummyComponentVersionAccess) GetReferenceByIndex(i int) (ComponentReference, error)
func (*DummyComponentVersionAccess) GetResource ¶
func (d *DummyComponentVersionAccess) GetResource(meta metav1.Identity) (ResourceAccess, error)
func (*DummyComponentVersionAccess) GetResourceByIndex ¶
func (d *DummyComponentVersionAccess) GetResourceByIndex(i int) (ResourceAccess, error)
func (*DummyComponentVersionAccess) GetResources ¶
func (d *DummyComponentVersionAccess) GetResources() []ResourceAccess
func (*DummyComponentVersionAccess) GetSource ¶
func (d *DummyComponentVersionAccess) GetSource(meta metav1.Identity) (SourceAccess, error)
func (*DummyComponentVersionAccess) GetSourceByIndex ¶
func (d *DummyComponentVersionAccess) GetSourceByIndex(i int) (SourceAccess, error)
func (*DummyComponentVersionAccess) GetSources ¶
func (d *DummyComponentVersionAccess) GetSources() []SourceAccess
func (*DummyComponentVersionAccess) GetVersion ¶
func (d *DummyComponentVersionAccess) GetVersion() string
func (*DummyComponentVersionAccess) Repository ¶
func (c *DummyComponentVersionAccess) Repository() Repository
func (*DummyComponentVersionAccess) SetReference ¶
func (d *DummyComponentVersionAccess) SetReference(ref *ComponentReference) error
func (*DummyComponentVersionAccess) SetResource ¶
func (d *DummyComponentVersionAccess) SetResource(meta *ResourceMeta, spec compdesc.AccessSpec) error
func (*DummyComponentVersionAccess) SetResourceBlob ¶
func (d *DummyComponentVersionAccess) SetResourceBlob(meta *ResourceMeta, blob BlobAccess, refname string, global AccessSpec) error
func (*DummyComponentVersionAccess) SetSource ¶
func (d *DummyComponentVersionAccess) SetSource(meta *SourceMeta, spec compdesc.AccessSpec) error
func (*DummyComponentVersionAccess) SetSourceBlob ¶
func (d *DummyComponentVersionAccess) SetSourceBlob(meta *SourceMeta, blob BlobAccess, refname string, global AccessSpec) error
type GenericAccessSpec ¶
type GenericAccessSpec = internal.GenericAccessSpec
type GenericRepositorySpec ¶
type GenericRepositorySpec = internal.GenericRepositorySpec
func ToGenericRepositorySpec ¶
func ToGenericRepositorySpec(spec RepositorySpec) (*GenericRepositorySpec, error)
type HintProvider ¶
type HintProvider internal.HintProvider
HintProvider is able to provide a name hint for globalization of local artifacts.
type ImplementationRepositoryType ¶
type ImplementationRepositoryType = internal.ImplementationRepositoryType
type IntermediateRepositorySpecAspect ¶
type IntermediateRepositorySpecAspect = internal.IntermediateRepositorySpecAspect
type NamePath ¶
func NewNamePath ¶
type OCISpecFunction ¶
type OCISpecFunction = internal.OCISpecFunction
type PrefixProvider ¶
type PrefixProvider interface {
PathPrefix() string
}
PrefixProvider is supported by RepositorySpecs to provide info about a potential path prefix to use for globalized local artifacts.
type Repository ¶
type Repository = internal.Repository
type RepositoryAccessMethodChecker ¶
type RepositoryAccessMethodChecker func(internal.Context, compdesc.AccessSpec) bool
type RepositorySpec ¶
type RepositorySpec = internal.RepositorySpec
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
type SourceAccess ¶
type SourceAccess = internal.SourceAccess
type SourceMeta ¶
type SourceMeta = internal.SourceMeta
type StorageContext ¶
type StorageContext = internal.StorageContext
type UniformRepositorySpec ¶
type UniformRepositorySpec = internal.UniformRepositorySpec
Source Files ¶
Click to show internal directories.
Click to hide internal directories.