Skip to content

download-starter-project Library API #842

Closed
devfile/registry-support
#126
@michael-valdron

Description

@michael-valdron

Which area this feature is related to?

/area registry

Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?

To perform the same operation as the download starter project REST API endpoint but as a library API.

Detailed description:

In issue #720, the download-starter-project REST API endpoint was added as a replacement for the previous functionality within the registry viewer. As discussed in PR devfile/registry-support#113, we would like to add a library API which performs the same operation as the current REST one to allow availability to clients which import the library API rather than connect the index server's REST API.

Describe the solution you'd like

An exported function which could be invoked the follow way:

  1. Import the devfile registry library
import (
    ...
    registryLibrary "github.com/devfile/registry-support/registry-library/library"
    ...
)
  1. Invoke download-starter-project function concepts
    1. Default
    bytes, err := registryLibrary.DownloadStarterProject("<stack>", "<starterProject>")
    1. Optional version parameter
    bytes, err := registryLibrary.DownloadStarterProjectWithVersion("<stack>", "<starterProject>", "<version>")

Describe alternatives you've considered

Omit this feature and downloading starter projects must either be done using the REST API or manually.

Target Date: 07-14-2022

Metadata

Metadata

Labels

area/registryDevfile registry for stacks and infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions