repository

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const CheckoutsPath = "/tmp/checkouts/"

Variables

This section is empty.

Functions

This section is empty.

Types

type BadVCSURLError

type BadVCSURLError struct {
	URL string
}

func (BadVCSURLError) Error

func (b BadVCSURLError) Error() string

type Credentials

type Credentials struct {
	Username    string
	AccessToken string
}

type Repository

type Repository struct {
	Name       string
	FSPath     string
	CodeOwners []string
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, vcsURL string, credentials Credentials) (*Repository, error)

New clones the repository supplied in the vcsURL parameter and returns a new Repository instance. If repository is private credentials must be supplied.

func (Repository) ExtractSBOMs

func (r Repository) ExtractSBOMs(ctx context.Context, includeGenericCollectors bool) (*cdx.BOM, error)

ExtractSBOMs extracts SBOMs for every possible language from the repository. If includeGenericCollectors is set to true then additional collectors such as: syft & retirejs & cdxgen are executed against the repository as well. This tends to produce richer SBOM results

func (Repository) String

func (r Repository) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL