Documentation
¶
Index ¶
- func InitFetchAllCVEs(fn CVEHandler) error
- func WithContext(ctx context.Context) func(m *SPDXMonitor)
- func WithStore(bstore *store.Store) func(m *SPDXMonitor)
- type CVEFetchOptions
- type CVEHandler
- type CVEImpact
- type CVEItem
- type CVEResponse
- type SPDXMonitor
- type SpdxLicense
- type SpdxLicenseList
- type SpdxRelease
- type SpdxSBOMModel
- type SupplierContact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitFetchAllCVEs ¶
func InitFetchAllCVEs(fn CVEHandler) error
func WithContext ¶
func WithContext(ctx context.Context) func(m *SPDXMonitor)
func WithStore ¶
func WithStore(bstore *store.Store) func(m *SPDXMonitor)
Types ¶
type CVEFetchOptions ¶
type CVEFetchOptions struct {
StartIndex int
ResultsPerPage int
ModStartDate *time.Time
ModEndDate *time.Time
Sleep time.Duration
}
func DefaultCVEFetchOptions ¶
func DefaultCVEFetchOptions() CVEFetchOptions
type CVEHandler ¶
type CVEHandler func(*CVEResponse) error
type CVEItem ¶
type CVEItem struct {
CVEDataMeta struct {
ID string `json:"ID"`
} `json:"CVE_data_meta"`
Description struct {
DescriptionData []struct {
Lang string `json:"lang"`
Value string `json:"value"`
} `json:"description_data"`
} `json:"description"`
PublishedDate string `json:"publishedDate"`
LastModifiedDate string `json:"lastModifiedDate"`
}
type CVEResponse ¶
type CVEResponse struct {
ResultsPerPage int `json:"resultsPerPage"`
StartIndex int `json:"startIndex"`
TotalResults int `json:"totalResults"`
Result struct {
CVEDataFormat string `json:"CVE_data_format"`
CVEItems []struct {
CVEItem CVEItem `json:"cve"`
Impact CVEImpact `json:"impact"`
} `json:"CVE_Items"`
} `json:"result"`
}
func FetchCVEs ¶
func FetchCVEs(opts CVEFetchOptions) (*CVEResponse, error)
type SPDXMonitor ¶
type SPDXMonitor struct {
// contains filtered or unexported fields
}
func NewSPDXMonitor ¶
func NewSPDXMonitor(opts ...func(m *SPDXMonitor)) (*SPDXMonitor, error)
func (*SPDXMonitor) Do ¶
func (m *SPDXMonitor) Do() error
type SpdxLicense ¶
type SpdxLicenseList ¶
type SpdxLicenseList struct {
ListVersion string `json:"licenseListVersion"`
Licenses []SpdxLicense `json:"licenses"`
ReleaseDate string `json:"releaseDate"`
}
type SpdxRelease ¶
type SpdxRelease struct {
TagName string `json:"tag_name"`
}
type SpdxSBOMModel ¶
type SpdxSBOMModel struct {
Version string `json:"Version,omitempty"`
Name string
Path string `json:"Path,omitempty"`
LocalPath string
Supplier SupplierContact
PackageURL string
// CheckSum *CheckSum
PackageHomePage string
PackageDownloadLocation string
LicenseConcluded string
LicenseDeclared string
CommentsLicense string
// OtherLicense []*License
Copyright string
PackageComment string
Root bool
}
func ParseSBOM ¶
func ParseSBOM(filename string) ([]SpdxSBOMModel, error)
Click to show internal directories.
Click to hide internal directories.