Documentation
¶
Index ¶
- func CloneRepoWithGit(ctx context.Context, repoURL, targetDir string) error
- func ConvertToJSON(inputPath, outputDir string) (string, error)
- func GetBinaryPath() (string, error)
- func IsValidURL(input string) bool
- func ParseGithubURL(githubURL string) (owner, repo, version string, err error)
- func ParseRepoVersion(repoURL string) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneRepoWithGit ¶
CloneRepoWithGit clones a GitHub repository using the Git command-line tool.
func ConvertToJSON ¶
convertToJSON converts SBOM content to JSON format and saves with .json extension
func GetBinaryPath ¶
func IsValidURL ¶
isValidURL checks if the given string is a valid URL
func ParseGithubURL ¶
ParseGithubURL extracts the repository owner, repo name, and it's version. For URLs like "https://github.com/interlynk-io/sbomqs@v1.0.0", returns "interlynk-io", "sbomqs", "v1.0.0", nil). For URLs like "https://github.com/interlynk-io/sbomqs", returns "interlynk-io", "sbomqs", "", nil). For URLs like "https://github.com/interlynk-io/", returns "interlynk-io", "", "", nil).
func ParseRepoVersion ¶
ParseRepoVersion extracts the repository URL without version and version from a GitHub URL. For URLs like "https://github.com/owner/repo", returns ("https://github.com/owner/repo", "latest", nil). For URLs like "https://github.com/owner/repo@v1.0.0", returns ("https://github.com/owner/repo", "v1.0.0", nil).
Types ¶
This section is empty.