Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrPathNotLocal = errors.New("report path is not local") ErrInvalidPathStructure = errors.New("invalid report path structure") )
Functions ¶
func IsPossibleReport ¶
IsPossibleReport returns true if the given file is possibly a report.
func OriginExistsInPaths ¶
OriginExistsInPaths returns true if an OSV report exists with an origin that exists with the same sourceID and shasum.
The function iterates across each of the base paths in bases and joins them with path using `filepath.Join(base, path)`.
An error is returned if there is an error reading the OSV reports, or the filesystem.
func ReportsInPaths ¶
ReportsInPaths returns a slice with all the filepaths to all OSV reports that share the same path (i.e. ecosystem and package name) across the directories in bases.
The function iterates across each of the base paths in bases and joins them with path using `filepath.Join(base, path)`.
An error will be returned if there is an error reading the the filesystem.
func ValidatePath ¶
ValidatePath ensures path is a valid place to put OSV reports.
This method enforces that every path is local, and that it has at least two path elements - i.e. an ecosystem, and a package name.
Types ¶
This section is empty.