internal

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIND_COMPONENTVERSION = "component version"
	KIND_RESOURCE         = "component resource"
	KIND_SOURCE           = "component source"
	KIND_REFERENCE        = compdesc.KIND_REFERENCE
)
View Source
const CONTEXT_TYPE = "ocm" + datacontext.OCM_CONTEXT_SUFFIX
View Source
const CommonTransportFormat = ctf.Type
View Source
const DEFAULT_BLOBHANDLER_PRIO = 100
View Source
const GenericBlobDigestV1 = "genericBlobDigest/v1"

Variables

View Source
var DefaultAccessTypeScheme = NewAccessTypeScheme()

DefaultAccessTypeScheme contains all globally known access serializer.

View Source
var DefaultBlobDigesterRegistry = NewBlobDigesterRegistry()
View Source
var DefaultBlobHandlerRegistry = NewBlobHandlerRegistry()
View Source
var DefaultContext = Builder{}.New(datacontext.MODE_SHARED)

DefaultContext is the default context initialized by init functions.

View Source
var DefaultRepositorySpecHandlers = NewRepositorySpecHandlers()
View Source
var DefaultRepositoryTypeScheme = NewRepositoryTypeScheme(nil)

DefaultRepositoryTypeScheme contains all globally known access serializer.

Functions

func AppendUnique

func AppendUnique(list *[]BlobDigester, elems ...BlobDigester)

func ErrComponentVersionNotFound

func ErrComponentVersionNotFound(name, version string) error

func ErrComponentVersionNotFoundWrap

func ErrComponentVersionNotFoundWrap(err error, name, version string) error

func MustRegisterBlobHandler

func MustRegisterBlobHandler(handler BlobHandler, opts ...BlobHandlerOption)

func MustRegisterDigester

func MustRegisterDigester(digester BlobDigester, arttypes ...string)

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(hdlr RepositorySpecHandler, types ...string)

Types

type AccessMethod

type AccessMethod interface {
	DataAccess

	GetKind() string
	AccessSpec() AccessSpec
	MimeType
	Close() error
}

AccessMethod described the access to a dedicated resource It can allocate external resources, which should be released with the Close() call. Resources SHOULD only be allocated, if the content is accessed via the DataAccess interface to avoid unnecessary effort if the method object is just used to access meta data.

type AccessMethodSupport

type AccessMethodSupport interface {
	GetContext() Context
	LocalSupportForAccessSpec(spec AccessSpec) bool
}

type AccessSpec

type AccessSpec interface {
	compdesc.AccessSpec
	Describe(Context) string
	IsLocal(Context) bool
	AccessMethod(access ComponentVersionAccess) (AccessMethod, error)
}

AccessSpec is the interface access method specifications must fulfill. The main task is to map the specification to a concrete implementation of the access method for a dedicated component version.

func CreateAccessSpec

func CreateAccessSpec(t runtime.TypedObject) (AccessSpec, error)

type AccessSpecRef

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

func NewAccessSpecRef

func NewAccessSpecRef(spec AccessSpec) *AccessSpecRef

func NewRawAccessSpecRef

func NewRawAccessSpecRef(data []byte, unmarshaler runtime.Unmarshaler) (*AccessSpecRef, error)

func (*AccessSpecRef) AccessMethod

func (a *AccessSpecRef) AccessMethod(access ComponentVersionAccess) (AccessMethod, error)

func (*AccessSpecRef) Describe

func (a *AccessSpecRef) Describe(ctx Context) string

func (*AccessSpecRef) Evaluate

func (a *AccessSpecRef) Evaluate(ctx Context) (AccessSpec, error)

func (*AccessSpecRef) GetKind

func (a *AccessSpecRef) GetKind() string

func (*AccessSpecRef) GetType

func (a *AccessSpecRef) GetType() string

func (*AccessSpecRef) GetVersion

func (a *AccessSpecRef) GetVersion() string

func (*AccessSpecRef) IsLocal

func (a *AccessSpecRef) IsLocal(ctx Context) bool

func (*AccessSpecRef) MarshalJSON

func (a *AccessSpecRef) MarshalJSON() ([]byte, error)

MarshalJSON implements a custom json unmarshal method for a unstructured type.

func (*AccessSpecRef) Set

func (a *AccessSpecRef) Set(spec AccessSpec)

func (*AccessSpecRef) UnmarshalJSON

func (a *AccessSpecRef) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a custom json unmarshal method for an access spec ref.

type AccessType

type AccessType interface {
	runtime.TypedObjectDecoder
	runtime.VersionedTypedObject

	ConfigOptionTypeSetHandler() flagsets.ConfigOptionTypeSetHandler

	Description() string
	Format(cli bool) string
}

func GetAccessType

func GetAccessType(name string) AccessType

type AccessTypeScheme

type AccessTypeScheme interface {
	runtime.Scheme
	AddKnownTypes(s AccessTypeScheme)

	GetAccessType(name string) AccessType
	Register(name string, atype AccessType)

	DecodeAccessSpec(data []byte, unmarshaler runtime.Unmarshaler) (AccessSpec, error)
	CreateAccessSpec(obj runtime.TypedObject) (AccessSpec, error)

	CreateConfigTypeSetConfigProvider() flagsets.ConfigTypeOptionSetConfigProvider
}

func NewAccessTypeScheme

func NewAccessTypeScheme(base ...AccessTypeScheme) AccessTypeScheme

type BaseAccess

type BaseAccess interface {
	Access() (AccessSpec, error)
	AccessMethod() (AccessMethod, error)
}

type BlobAccess

type BlobAccess = accessio.BlobAccess

type BlobDigester

type BlobDigester interface {
	GetType() DigesterType
	DetermineDigest(resType string, meth AccessMethod, preferred signing.Hasher) (*DigestDescriptor, error)
}

BlobDigester is the interface for digest providers for dedicated mime types. If found the digest provided by the digester will replace the standard digest calculated for the byte content of the blob.

type BlobDigesterRegistry

type BlobDigesterRegistry interface {
	IsInitial() bool
	// MustRegisterDigester registers a blob digester for a dedicated exact mime type
	//
	Register(handler BlobDigester, restypes ...string) error
	// GetDigester returns the digester for a given type
	GetDigester(typ DigesterType) BlobDigester

	GetDigesterForType(t string) []BlobDigester
	DetermineDigests(typ string, preferred signing.Hasher, registry signing.Registry, acc AccessMethod, typs ...DigesterType) ([]DigestDescriptor, error)

	Copy() BlobDigesterRegistry
}

BlobDigesterRegistry registers blob handlers to use in a dedicated ocm context.

func NewBlobDigesterRegistry

func NewBlobDigesterRegistry(base ...BlobDigesterRegistry) BlobDigesterRegistry

type BlobHandler

type BlobHandler interface {
	// StoreBlob has the chance to decide to store a local blob
	// in a repository specific fashion providing external access.
	// If this is possible and done an appropriate access spec
	// must be returned, if this is not done, nil has to be returned
	// without error
	StoreBlob(blob BlobAccess, artType, hint string, global AccessSpec, ctx StorageContext) (AccessSpec, error)
}

BlobHandler s the interface for a dedicated handling of storing blobs for the LocalBlob access method in a dedicated kind of repository. with the possibility of access by an external distribution spec. (besides of the blob storage as part of a component version). The technical repository to use should be derivable from the chosen component directory or passed together with the storage context. The task of the handler is to store the local blob on its own responsibility and to return an appropriate global access method.

type BlobHandlerConfig

type BlobHandlerConfig interface{}

type BlobHandlerKey

type BlobHandlerKey struct {
	ImplementationRepositoryType
	ArtifactType string
	MimeType     string
}

BlobHandlerKey is the registration key for BlobHandlers.

func NewBlobHandlerKey

func NewBlobHandlerKey(ctxtype, repotype, artifactType, mimetype string) BlobHandlerKey

func (BlobHandlerKey) ApplyBlobHandlerOptionTo

func (k BlobHandlerKey) ApplyBlobHandlerOptionTo(opts *BlobHandlerOptions)

type BlobHandlerOption

type BlobHandlerOption interface {
	ApplyBlobHandlerOptionTo(*BlobHandlerOptions)
}

func ForArtifactType

func ForArtifactType(artifacttype string) BlobHandlerOption

func ForMimeType

func ForMimeType(mimetype string) BlobHandlerOption

func ForRepo

func ForRepo(ctxtype, repotype string) BlobHandlerOption

func WithPrio

func WithPrio(p int) BlobHandlerOption

type BlobHandlerOptions

type BlobHandlerOptions struct {
	BlobHandlerKey
	Priority int
}

func NewBlobHandlerOptions

func NewBlobHandlerOptions(olist ...BlobHandlerOption) *BlobHandlerOptions

func (BlobHandlerOptions) ApplyBlobHandlerOptionTo

func (o BlobHandlerOptions) ApplyBlobHandlerOptionTo(opts *BlobHandlerOptions)

type BlobHandlerRegistrationHandler

type BlobHandlerRegistrationHandler interface {
	RegisterByName(handler string, ctx Context, config BlobHandlerConfig, opts ...BlobHandlerOption) (bool, error)
}

type BlobHandlerRegistrationRegistry

type BlobHandlerRegistrationRegistry interface {
	BlobHandlerRegistrationHandler
	RegisterRegistrationHandler(path string, handler BlobHandlerRegistrationHandler)
	GetRegistrationHandlers(name string) []*RegistrationHandlerInfo
}

type BlobHandlerRegistry

type BlobHandlerRegistry interface {
	BlobHandlerRegistrationRegistry

	IsInitial() bool

	// Copy provides a new independend copy of the registry.
	Copy() BlobHandlerRegistry
	// RegisterBlobHandler registers a blob handler. It must specify either a sole mime type,
	// or a context and repository type, or all three keys.
	Register(handler BlobHandler, opts ...BlobHandlerOption) BlobHandlerRegistry

	// GetHandler returns the handler with the given key.
	GetHandler(key BlobHandlerKey) BlobHandler

	// LookupHandler returns handler trying all matches in the following order:
	//
	// - a handler matching all keys
	// - handlers matching the repo and mime type (from specific to more general by discarding + components)
	//   - with artifact type
	//   - without artifact type
	// - handlers matching artifact type
	// - handlers matching a sole mimetype handler (from specific to more general by discarding + components)
	// - a handler matching the repo
	//
	LookupHandler(repotype ImplementationRepositoryType, artifacttype, mimeType string) BlobHandler
}

BlobHandlerRegistry registers blob handlers to use in a dedicated ocm context.

func NewBlobHandlerRegistry

func NewBlobHandlerRegistry(base ...BlobHandlerRegistry) BlobHandlerRegistry

type Builder

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

func (Builder) Bound

func (b Builder) Bound() (Context, context.Context)

func (Builder) New

func (b Builder) New(m ...datacontext.BuilderMode) Context

func (Builder) WithAccessTypeScheme

func (b Builder) WithAccessTypeScheme(scheme AccessTypeScheme) Builder

func (Builder) WithBlobDigesters

func (b Builder) WithBlobDigesters(reg BlobDigesterRegistry) Builder

func (Builder) WithBlobHandlers

func (b Builder) WithBlobHandlers(reg BlobHandlerRegistry) Builder

func (Builder) WithContext

func (b Builder) WithContext(ctx context.Context) Builder

func (Builder) WithCredentials

func (b Builder) WithCredentials(ctx credentials.Context) Builder

func (Builder) WithOCIRepositories

func (b Builder) WithOCIRepositories(ctx oci.Context) Builder

func (Builder) WithRepositorySpecHandlers

func (b Builder) WithRepositorySpecHandlers(reg RepositorySpecHandlers) Builder

func (Builder) WithRepositoyTypeScheme

func (b Builder) WithRepositoyTypeScheme(scheme RepositoryTypeScheme) Builder

type ComponentAccess

type ComponentAccess interface {
	GetContext() Context
	GetName() string

	ListVersions() ([]string, error)
	LookupVersion(version string) (ComponentVersionAccess, error)
	AddVersion(ComponentVersionAccess) error
	NewVersion(version string, overrides ...bool) (ComponentVersionAccess, error)

	Close() error
	Dup() (ComponentAccess, error)
}

type ComponentLister

type ComponentLister interface {
	// NumComponents returns the number of components found for a prefix
	// If the given prefix does not end with a /, a repository with the
	// prefix name is included
	NumComponents(prefix string) (int, error)

	// GetNamespaces returns the name of namespaces found for a prefix
	// If the given prefix does not end with a /, a repository with the
	// prefix name is included
	GetComponents(prefix string, closure bool) ([]string, error)
}

ComponentLister provides the optional repository list functionality of a repository.

type ComponentReference

type ComponentReference = compdesc.ComponentReference

type ComponentVersionAccess

type ComponentVersionAccess interface {
	common.VersionedElement

	Repository() Repository

	GetContext() Context

	GetDescriptor() *compdesc.ComponentDescriptor

	GetResources() []ResourceAccess
	GetResource(meta metav1.Identity) (ResourceAccess, error)
	GetResourceByIndex(i int) (ResourceAccess, error)

	GetSources() []SourceAccess
	GetSource(meta metav1.Identity) (SourceAccess, error)
	GetSourceByIndex(i int) (SourceAccess, error)

	GetReference(meta metav1.Identity) (ComponentReference, error)
	GetReferenceByIndex(i int) (ComponentReference, error)

	// AccessMethod provides an access method implementation for
	// an access spec. This might be a repository local implementation
	// or a global one. It might be called by the AccessSpec method
	// to map itself to a local implementation or called directly.
	// If called it should forward the call to the AccessSpec
	// if and only if this specs NOT states to be local IsLocal()==false
	// If the spec states to be local, the repository is responsible for
	// providing a local implementation or return nil if this is
	// not supported by the actual repository type.
	AccessMethod(AccessSpec) (AccessMethod, error)

	// AddBlob adds a local blob and returns an appropriate local access spec
	AddBlob(blob BlobAccess, artType, refName string, global AccessSpec) (AccessSpec, error)

	SetResourceBlob(meta *ResourceMeta, blob BlobAccess, refname string, global AccessSpec) error
	SetResource(*ResourceMeta, compdesc.AccessSpec) error
	// AdjustResourceAccess is used to modify the access spec. The old and new one MUST refer to the same content.
	AdjustResourceAccess(meta *ResourceMeta, acc compdesc.AccessSpec) error

	SetSourceBlob(meta *SourceMeta, blob BlobAccess, refname string, global AccessSpec) error
	SetSource(*SourceMeta, compdesc.AccessSpec) error

	SetReference(ref *ComponentReference) error

	DiscardChanges()

	// Dup provides a separately closeable view to a component version access.
	// If the actual instance is already closed, an error is returned.
	Dup() (ComponentVersionAccess, error)
	io.Closer
}

type ComponentVersionResolver

type ComponentVersionResolver interface {
	LookupComponentVersion(name string, version string) (ComponentVersionAccess, error)
}

type Context

type Context interface {
	datacontext.Context
	config.ContextProvider
	credentials.ContextProvider
	oci.ContextProvider

	RepositoryTypes() RepositoryTypeScheme
	AccessMethods() AccessTypeScheme

	RepositorySpecHandlers() RepositorySpecHandlers
	MapUniformRepositorySpec(u *UniformRepositorySpec) (RepositorySpec, error)

	BlobHandlers() BlobHandlerRegistry
	BlobDigesters() BlobDigesterRegistry

	RepositoryForSpec(spec RepositorySpec, creds ...credentials.CredentialsSource) (Repository, error)
	RepositoryForConfig(data []byte, unmarshaler runtime.Unmarshaler, creds ...credentials.CredentialsSource) (Repository, error)
	AccessSpecForSpec(spec compdesc.AccessSpec) (AccessSpec, error)
	AccessSpecForConfig(data []byte, unmarshaler runtime.Unmarshaler) (AccessSpec, error)

	Encode(AccessSpec, runtime.Marshaler) ([]byte, error)

	GetAlias(name string) RepositorySpec
	SetAlias(name string, spec RepositorySpec)

	// Finalize finalizes elements implicitly opened during resource operations.
	// For example, registered blob handler may open objects, which are kept open
	// for performance reasons. At the end of a usage finalize should be called
	// to finalize those elements. This method can be called any time by a context
	// user to cleanup temporarily allocated resources. Therefore, only
	// elements should be added to the finalzer, which can be reopened/created
	// on-the fly whenever required.
	Finalize() error
	Finalizer() *utils.Finalizer
}

func DefinedForContext

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

func ForContext

func ForContext(ctx context.Context) Context

ForContext returns the Context to use for context.Context. This is either an explicit context or the default context.

type ContextProvider

type ContextProvider interface {
	OCMContext() Context
}

type DataAccess

type DataAccess = accessio.DataAccess

type DigestDescriptor

type DigestDescriptor = metav1.DigestSpec

func NewDigestDescriptor

func NewDigestDescriptor(digest, hashAlgo, normAlgo string) *DigestDescriptor

type DigesterType

type DigesterType struct {
	HashAlgorithm          string
	NormalizationAlgorithm string
}

type EvaluatableAccessSpec

type EvaluatableAccessSpec interface {
	AccessSpec
	Evaluate(ctx Context) (AccessSpec, error)
}

type GenericAccessSpec

type GenericAccessSpec struct {
	runtime.UnstructuredVersionedTypedObject `json:",inline"`
}

func NewGenericAccessSpec

func NewGenericAccessSpec(spec string) (*GenericAccessSpec, error)

func (*GenericAccessSpec) AccessMethod

func (*GenericAccessSpec) Describe

func (s *GenericAccessSpec) Describe(ctx Context) string

func (*GenericAccessSpec) Evaluate

func (s *GenericAccessSpec) Evaluate(ctx Context) (AccessSpec, error)

func (*GenericAccessSpec) IsLocal

func (s *GenericAccessSpec) IsLocal(ctx Context) bool

type GenericRepositorySpec

type GenericRepositorySpec struct {
	runtime.UnstructuredVersionedTypedObject `json:",inline"`
}

func ToGenericRepositorySpec

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

func (*GenericRepositorySpec) AsUniformSpec

func (s *GenericRepositorySpec) AsUniformSpec(ctx Context) UniformRepositorySpec

func (*GenericRepositorySpec) Evaluate

func (s *GenericRepositorySpec) Evaluate(ctx Context) (RepositorySpec, error)

func (*GenericRepositorySpec) Repository

type HintProvider

type HintProvider interface {
	GetReferenceHint(cv ComponentVersionAccess) string
}

HintProvider is used to provide a reference hint for local access method specs. It may optionally be provided by an access spec. When adding blobs to a repository the hint is used by blobhandlers for expanding a blob to a repository specific representation to determine a useful name.

type ImplementationRepositoryType

type ImplementationRepositoryType struct {
	ContextType    string
	RepositoryType string
}

func (ImplementationRepositoryType) IsInitial

func (t ImplementationRepositoryType) IsInitial() bool

func (ImplementationRepositoryType) String

type IntermediateRepositorySpecAspect

type IntermediateRepositorySpecAspect = oci.IntermediateRepositorySpecAspect

type MimeType

type MimeType = accessio.MimeType

type MultiBlobHandler

type MultiBlobHandler []BlobHandler

MultiBlobHandler is a BlobHandler consisting of a sequence of handlers.

func (MultiBlobHandler) Len

func (m MultiBlobHandler) Len() int

func (MultiBlobHandler) Less

func (m MultiBlobHandler) Less(i, j int) bool

func (MultiBlobHandler) StoreBlob

func (m MultiBlobHandler) StoreBlob(blob BlobAccess, artType, hint string, global AccessSpec, ctx StorageContext) (AccessSpec, error)

func (MultiBlobHandler) Swap

func (m MultiBlobHandler) Swap(i, j int)

type NamePath

type NamePath []string

func NewNamePath

func NewNamePath(path string) NamePath

func (NamePath) Compare

func (p NamePath) Compare(o NamePath) int

func (NamePath) IsPrefixOf

func (p NamePath) IsPrefixOf(o NamePath) bool

type OCISpecFunction

type OCISpecFunction func(ctx oci.Context) (RepositoryType, error)

type PrioBlobHandler

type PrioBlobHandler struct {
	BlobHandler
	Prio int
}

type RegistrationHandlerInfo

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

func NewRegistrationHandlerInfo

func NewRegistrationHandlerInfo(path string, handler BlobHandlerRegistrationHandler) *RegistrationHandlerInfo

func (*RegistrationHandlerInfo) RegisterByName

func (i *RegistrationHandlerInfo) RegisterByName(handler string, ctx Context, config BlobHandlerConfig, opts ...BlobHandlerOption) (bool, error)

type Repository

type Repository interface {
	GetContext() Context

	GetSpecification() RepositorySpec
	ComponentLister() ComponentLister

	ExistsComponentVersion(name string, version string) (bool, error)
	LookupComponentVersion(name string, version string) (ComponentVersionAccess, error)
	LookupComponent(name string) (ComponentAccess, error)

	Close() error
}

type RepositorySpec

type RepositorySpec interface {
	runtime.VersionedTypedObject

	AsUniformSpec(Context) UniformRepositorySpec
	Repository(Context, credentials.Credentials) (Repository, error)
}

func CreateRepositorySpec

func CreateRepositorySpec(t runtime.TypedObject) (RepositorySpec, error)

func NewGenericRepositorySpec

func NewGenericRepositorySpec(data []byte, unmarshaler runtime.Unmarshaler) (RepositorySpec, error)

type RepositorySpecHandler

type RepositorySpecHandler interface {
	MapReference(ctx Context, u *UniformRepositorySpec) (RepositorySpec, error)
}

type RepositorySpecHandlers

type RepositorySpecHandlers interface {
	Register(hdlr RepositorySpecHandler, types ...string)
	Copy() RepositorySpecHandlers
	KnownTypeNames() []string
	GetHandlers(typ string) []RepositorySpecHandler
	MapUniformRepositorySpec(ctx Context, u *UniformRepositorySpec) (RepositorySpec, error)
}

func NewRepositorySpecHandlers

func NewRepositorySpecHandlers() RepositorySpecHandlers

type RepositoryType

type RepositoryType interface {
	runtime.TypedObjectDecoder
	runtime.VersionedTypedObject

	// LocalSupportForAccessSpec checks whether a repository
	// provides a local version for the access spec.
	LocalSupportForAccessSpec(ctx Context, a compdesc.AccessSpec) bool
}

type RepositoryTypeScheme

type RepositoryTypeScheme interface {
	runtime.Scheme
	AddKnownTypes(s RepositoryTypeScheme)

	GetRepositoryType(name string) RepositoryType
	Register(name string, atype RepositoryType)

	DecodeRepositorySpec(data []byte, unmarshaler runtime.Unmarshaler) (RepositorySpec, error)
	CreateRepositorySpec(obj runtime.TypedObject) (RepositorySpec, error)
}

func NewRepositoryTypeScheme

func NewRepositoryTypeScheme(defaultRepoDecoder runtime.TypedObjectDecoder, base ...RepositoryTypeScheme) RepositoryTypeScheme

type ResourceAccess

type ResourceAccess interface {
	Meta() *ResourceMeta
	BaseAccess
}

type ResourceMeta

type ResourceMeta = compdesc.ResourceMeta

type SourceAccess

type SourceAccess interface {
	Meta() *SourceMeta
	BaseAccess
}

type SourceMeta

type SourceMeta = compdesc.SourceMeta

type StorageContext

type StorageContext interface {
	GetContext() Context
	TargetComponentVersion() ComponentVersionAccess
	TargetComponentRepository() Repository
	GetImplementationRepositoryType() ImplementationRepositoryType
}

StorageContext is an object describing the storage context used for the mapping of a component repository to a base repository (e.g. oci api) It depends on the Context type of the used base repository.

type UniformRepositorySpec

type UniformRepositorySpec struct {
	// Type
	Type string `json:"type,omitempty"`
	// Host is the hostname of an ocm ref.
	Host string `json:"host,omitempty"`
	// SubPath is the sub path spec used to host component versions
	SubPath string `json:"subPath,omitempty"`
	// Info is the file path used to host ctf component versions
	Info string `json:"filePath,omitempty"`

	// CreateIfMissing indicates whether a file based or dynamic repo should be created if it does not exist
	CreateIfMissing bool `json:"createIfMissing,omitempty"`
	// TypeHintshould be set if CreateIfMissing is true to help to decide what kind of repo to create
	TypeHint string `json:"typeHint,omitempty"`
}

UniformRepositorySpec is generic specification of the repository for handling as part of standard references.

func (*UniformRepositorySpec) CredHost

func (r *UniformRepositorySpec) CredHost() string

CredHost fallback to legacy docker domain if applicable this is how containerd translates the old domain for DockerHub to the new one, taken from containerd/reference/docker/reference.go:674.

func (*UniformRepositorySpec) String

func (u *UniformRepositorySpec) String() string

type UnknownAccessSpec

type UnknownAccessSpec struct {
	runtime.UnstructuredVersionedTypedObject `json:",inline"`
}

func (*UnknownAccessSpec) AccessMethod

func (*UnknownAccessSpec) Describe

func (s *UnknownAccessSpec) Describe(ctx Context) string

func (*UnknownAccessSpec) IsLocal

func (_ *UnknownAccessSpec) IsLocal(Context) bool

type UnknownRepositorySpec

type UnknownRepositorySpec struct {
	runtime.UnstructuredVersionedTypedObject `json:",inline"`
}

func (*UnknownRepositorySpec) AsUniformSpec

func (*UnknownRepositorySpec) Repository

Jump to

Keyboard shortcuts

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