-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move DynamicAnalysisRecord struct to public API (#986)
Signed-off-by: Max Fisher <[email protected]>
- Loading branch information
1 parent
8ebae41
commit 93da81c
Showing
4 changed files
with
18 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
package resultstore | ||
|
||
import "github.com/ossf/package-analysis/pkg/api/pkgecosystem" | ||
|
||
// Pkg describes the various package details used to populate the package part | ||
// of the analysis results. | ||
type Pkg interface { | ||
Ecosystem() pkgecosystem.Ecosystem | ||
EcosystemName() string | ||
Name() string | ||
Version() string | ||
} | ||
|
||
// pkg is an internal representation of a Pkg, which can be marshalled into JSON. | ||
type pkg struct { | ||
Ecosystem string `json:"Ecosystem"` | ||
Name string `json:"Name"` | ||
Version string `json:"Version"` | ||
} | ||
|
||
// DynamicAnalysisRecord is the top-level struct which is serialised to produce JSON results files | ||
// for dynamic analysis | ||
type DynamicAnalysisRecord struct { | ||
Package pkg `json:"Package"` | ||
CreatedTimestamp int64 `json:"CreatedTimestamp"` | ||
Analysis any `json:"Analysis"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters