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

Document/formalise use of Parlay as a library #10

Open
garethr opened this issue Jun 9, 2023 · 1 comment
Open

Document/formalise use of Parlay as a library #10

garethr opened this issue Jun 9, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@garethr
Copy link
Collaborator

garethr commented Jun 9, 2023

While Parlay can be used as a CLI tool, it should also be possible to use it as a library. This isn't formalised at all yet however, or documented. This could be used in tools that build SBOMs to automatically enrich them at creation.

@garethr garethr added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Jun 9, 2023
@mcombuechen
Copy link
Collaborator

Some thoughts on this

Change repo structure

Rename lib directory to pkg. This is opinionated and based on https://github.com/golang-standards/project-layout#pkg, just a suggestion.

Change API to handle primitives

As an example, ecosystems.GetPackageData currently receives a packageurl.PackageURL, which immediately forces consumers to add the packageurl lib to their projects. A string as input would probably be more convenient.

Return errors

Errors are currently mostly being swallowed, making it hard for consumers to understand when and why something unforeseen happened, and to react accordingly. An example would be the EnrichSBOM functions, which currently have no effect if an API call fails; but they also don’t notify of such failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants