Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download-starter-project Library API #842

Closed
michael-valdron opened this issue May 5, 2022 · 1 comment · Fixed by devfile/registry-support#126
Closed

download-starter-project Library API #842

michael-valdron opened this issue May 5, 2022 · 1 comment · Fixed by devfile/registry-support#126
Assignees
Labels
area/registry Devfile registry for stacks and infrastructure

Comments

@michael-valdron
Copy link
Member

michael-valdron commented May 5, 2022

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

@michael-valdron michael-valdron self-assigned this May 5, 2022
@michael-valdron
Copy link
Member Author

michael-valdron commented May 5, 2022

/area registry

@openshift-ci openshift-ci bot added area/library Common devfile library for interacting with devfiles area/registry Devfile registry for stacks and infrastructure labels May 5, 2022
@michael-valdron michael-valdron added kind/enhancement New feature or request and removed kind/enhancement New feature or request labels May 19, 2022
@yangcao77 yangcao77 removed the area/library Common devfile library for interacting with devfiles label Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants