Documentation ¶
Index ¶
- Constants
- type Path
- type URI
- func (u *URI) AsRelativeResourceReference() (*v1.ResourceReference, error)
- func (u *URI) Get(cd model.ComponentVersion, repositoryContext *types.UnstructuredTypedObject) (lsv1alpha1.ComponentDescriptorKind, interface{}, error)
- func (u *URI) GetComponent(cd model.ComponentVersion, repositoryContext *types.UnstructuredTypedObject, ...) (model.ComponentVersion, *lsv1alpha1.ComponentDescriptorReference, error)
- func (u *URI) GetResource(cd model.ComponentVersion, repositoryContext *types.UnstructuredTypedObject) (model.ComponentVersion, model.Resource, error)
Constants ¶
const ( ComponentReferences = "componentReferences" Resources = "resources" )
path keywords
const MaxURICharLength = 2083
MaxURICharLength is teh maximum length that is supported for a uri.
const PathDelimiter = "/"
const Scheme = "cd"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URI ¶
URI defines a component descriptor resource selector URI
func ParseURI ¶
ParseURI parses a component descriptor access uri of the format: cd://<keyword>/<value>/<keyword>/<value>/...
func (*URI) AsRelativeResourceReference ¶
func (u *URI) AsRelativeResourceReference() (*v1.ResourceReference, error)
func (*URI) Get ¶
func (u *URI) Get(cd model.ComponentVersion, repositoryContext *types.UnstructuredTypedObject) (lsv1alpha1.ComponentDescriptorKind, interface{}, error)
Get resolves to a resource (model.Resource) or component (model.ComponentVersion) specified by the URI. It also returns the resource kind.
func (*URI) GetComponent ¶
func (u *URI) GetComponent(cd model.ComponentVersion, repositoryContext *types.UnstructuredTypedObject, overwriter componentoverwrites.Overwriter) (model.ComponentVersion, *lsv1alpha1.ComponentDescriptorReference, error)
GetComponent resolves to the component descriptor specified by the URI. If a resource is specified, the component descriptor of the resource is returned, in combination with the reference from which it was resolved. ComponentVersionOverwrites are taken into account, but unlike the returned component, the reference is not overwritten.
func (*URI) GetResource ¶
func (u *URI) GetResource(cd model.ComponentVersion, repositoryContext *types.UnstructuredTypedObject) (model.ComponentVersion, model.Resource, error)
GetResource resolves to a resource specified by the URI. It also returns the resource kind.