Documentation
¶
Index ¶
- Constants
- Variables
- func DownloadCache(url, dest string) error
- func ShouldReload(c *Cache, latestDumpEndpoint string) bool
- type API
- func (api *API) Cves(request *CvesRequest) (*Cves, error)
- func (api *API) DBChange() *DBChange
- func (api *API) Errata(request *ErrataRequest) (*Errata, error)
- func (api *API) LoadCacheFromFile(cachePath string) error
- func (api *API) LoadCacheFromURL(cacheURL string) error
- func (api *API) OSVulnerabilityReport() (*VulnerabilityReport, error)
- func (api *API) Packages(request *PackagesRequest) (*Packages, error)
- func (api *API) Patches(request *Request) (*Patches, error)
- func (api *API) PeriodicCacheReload(interval time.Duration, latestDumpEndpoint string, cacheURL *string)
- func (api *API) PkgList(request *PkgListRequest) *PkgList
- func (api *API) PkgTree(request *PkgTreeRequest) (*PkgTree, error)
- func (api *API) RPMPkgNames(request *RPMPkgNamesRequest) (*RPMPkgNames, error)
- func (api *API) Repos(request *ReposRequest) (*Repos, error)
- func (api *API) SRPMPkgNames(request *SRPMPkgNamesRequest) (*SRPMPkgNames, error)
- func (api *API) Updates(request *Request) (*Updates, error)
- func (api *API) Version() *string
- func (api *API) Vulnerabilities(request *Request) (*Vulnerabilities, error)
- func (api *API) VulnerabilitiesExtended(request *Request) (*VulnerabilitiesExtended, error)
- type AffectedPackage
- type ArchID
- type CSAFCVEID
- type CSAFCVEProduct
- type CSAFCVEs
- type CSAFProduct
- type CSAFProductID
- type CVEID
- type Cache
- type ContentData
- type ContentSetID
- type CpeID
- type CpeIDNameID
- type CpeLabel
- type CveDetail
- type CveDetails
- type CveIDString
- type Cves
- type CvesRequest
- type DBChange
- type Errata
- type ErrataRequest
- type ErratumDetail
- type ErratumDetails
- type ErratumID
- type EvrID
- type Module
- type ModuleStream
- type ModuleStreamPtrs
- type NameArch
- type NameID
- type Nevra
- type NevraIDs
- type NevraString
- type OSReleaseDetail
- type Option
- func WithExcludedPackages(pkgs map[string]bool) Option
- func WithExcludedReleases(rel map[string]bool) Option
- func WithMaxGoroutines(g int) Option
- func WithNewerReleaseverCsaf(n bool) Option
- func WithNewerReleaseverRepos(n bool) Option
- func WithUnfixed(u bool) Option
- func WithVmaasVersionFilePath(path string) Option
- type Package
- type PackageDetail
- type PackageDetailResponse
- type PackageDetails
- type Packages
- type PackagesRequest
- type ParsedCpe
- type Patches
- type PkgErratum
- type PkgID
- type PkgList
- type PkgListItem
- type PkgListRequest
- type PkgTree
- type PkgTreeErratumDetail
- type PkgTreeItem
- type PkgTreeItems
- type PkgTreeRepoDetail
- type PkgTreeRequest
- type ProcessedRequest
- type ProductsPackage
- type RPMData
- type RPMPkgNames
- type RPMPkgNamesRequest
- type ReleaseGraph
- type ReleaseGraphRaw
- type ReleaseNode
- type RepoDetail
- type RepoDetailCommon
- type RepoDetails
- type RepoID
- type Repos
- type ReposRequest
- type Request
- type SRPMPkgNames
- type SRPMPkgNamesRequest
- type SeverityT
- type TypeT
- type Update
- type UpdateDetail
- type UpdateList
- type Updates
- type VariantSuffix
- type Vulnerabilities
- type VulnerabilitiesCvesDetails
- type VulnerabilitiesExtended
- type Vulnerability
- type VulnerabilityDetail
- type VulnerabilityReport
Constants ¶
const ( SecurityErratumType = "security" CriticalCveImpact = "Critical" ImportantCveImpact = "Important" ModerateCveImpact = "Moderate" LowCveImpact = "Low" )
const DefaultVariantSuffix = "N/A"
const Dump = "/data/vmaas.db"
Variables ¶
var ( ErrProcessingInput = errors.New("processing input") ReleaseverRegex = regexp.MustCompile(`^\d+\.\d+$`) )
Functions ¶
func DownloadCache ¶
func ShouldReload ¶ added in v1.0.1
Types ¶
type API ¶
type API struct { Cache *Cache // contains filtered or unexported fields }
func (*API) Errata ¶ added in v1.14.0
func (api *API) Errata(request *ErrataRequest) (*Errata, error)
func (*API) LoadCacheFromFile ¶
func (*API) LoadCacheFromURL ¶
func (*API) OSVulnerabilityReport ¶ added in v1.16.0
func (api *API) OSVulnerabilityReport() (*VulnerabilityReport, error)
func (*API) Packages ¶ added in v1.18.0
func (api *API) Packages(request *PackagesRequest) (*Packages, error)
func (*API) PeriodicCacheReload ¶
func (*API) PkgList ¶ added in v1.19.0
func (api *API) PkgList(request *PkgListRequest) *PkgList
func (*API) PkgTree ¶ added in v1.21.0
func (api *API) PkgTree(request *PkgTreeRequest) (*PkgTree, error)
func (*API) RPMPkgNames ¶ added in v1.24.0
func (api *API) RPMPkgNames(request *RPMPkgNamesRequest) (*RPMPkgNames, error)
func (*API) SRPMPkgNames ¶ added in v1.25.0
func (api *API) SRPMPkgNames(request *SRPMPkgNamesRequest) (*SRPMPkgNames, error)
func (*API) Vulnerabilities ¶
func (api *API) Vulnerabilities(request *Request) (*Vulnerabilities, error)
func (*API) VulnerabilitiesExtended ¶
func (api *API) VulnerabilitiesExtended(request *Request) (*VulnerabilitiesExtended, error)
type AffectedPackage ¶ added in v0.7.0
type AffectedPackage struct { Name string `json:"package_name"` EVRA string `json:"evra"` Cpe CpeLabel `json:"cpe"` ModuleStreamPtrs }
type CSAFCVEProduct ¶ added in v1.3.0
type CSAFCVEProduct struct { CVEID CVEID CSAFProductID CSAFProductID }
type CSAFProduct ¶ added in v1.3.0
type CSAFProduct struct { CpeID CpeID VariantSuffix VariantSuffix PackageNameID NameID PackageID PkgID ModuleStream ModuleStream }
type CSAFProductID ¶ added in v1.3.0
type CSAFProductID int
type Cache ¶
type Cache struct { DumpSchemaVersion int Packagename2ID map[string]NameID ID2Packagename map[NameID]string // name -> []pkg ordered by e-v-r ordering Updates map[NameID][]PkgID // name -> evr -> idx into updates[name] UpdatesIndex map[NameID]map[EvrID][]int PackageDetailsModifiedIndex []PkgID Evr2ID map[utils.Evr]EvrID ID2Evr map[EvrID]utils.Evr ID2Arch map[ArchID]string Arch2ID map[string]ArchID ArchCompat map[ArchID]map[ArchID]bool PackageDetails map[PkgID]PackageDetail Nevra2PkgID map[Nevra]PkgID RepoIDs []RepoID RepoDetails map[RepoID]RepoDetail RepoLabel2IDs map[string][]RepoID RepoOrgs map[string]bool RepoPath2IDs map[string][]RepoID Label2ContentSetID map[string]ContentSetID ContentSetID2Label map[ContentSetID]string ContentSetID2PkgNameIDs map[ContentSetID][]NameID SrcPkgNameID2ContentSetIDs map[NameID][]ContentSetID ProductID2RepoIDs map[int][]RepoID PkgID2RepoIDs map[PkgID][]RepoID ErratumID2Name map[ErratumID]string PkgID2ErratumIDs map[PkgID][]ErratumID ErratumID2RepoIDs map[ErratumID]map[RepoID]bool CveDetail map[string]CveDetail CveNames map[int]string PkgErratum2Module map[PkgErratum][]int Module2IDs map[ModuleStream][]int ModuleRequires map[int][]int DBChange DBChange ErratumDetails map[string]ErratumDetail SrcPkgID2PkgID map[PkgID][]PkgID String map[int]string ContentSetID2CpeIDs map[ContentSetID][]CpeID RepoID2CpeIDs map[RepoID][]CpeID CpeID2Label map[CpeID]CpeLabel CpeLabel2ID map[CpeLabel]CpeID // CSAF CSAFProductStatus map[int]string CSAFCVEs map[VariantSuffix]map[CpeIDNameID]map[CSAFProductID]CSAFCVEs CSAFCVEProduct2Erratum map[CSAFCVEProduct]string CSAFProduct2ID map[CSAFProduct]CSAFProductID CSAFProductID2Product map[CSAFProductID]CSAFProduct ReleaseGraphs []ReleaseGraph OSReleaseDetails map[int]OSReleaseDetail }
type ContentData ¶ added in v1.24.0
type ContentSetID ¶
type ContentSetID int
type CpeIDNameID ¶ added in v1.6.0
type CveDetail ¶
type CveDetail struct { Name string `json:"synopsis" example:"CVE-2017-5715"` RedHatURL string `json:"redhat_url" example:"https://access.redhat.com/security/cve/cve-2017-5715"` SecondaryURL string `json:"secondary_url" example:"https://seconday.url.com"` Cvss3Score string `json:"cvss3_score" example:"5.1"` Cvss3Metrics string `json:"cvss3_metrics" example:"AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N"` Impact string `json:"impact" enums:"NotSet,None,Low,Medium,Moderate,Important,High,Critical"` PublishedDate *time.Time `json:"public_date" example:"2018-01-04T13:29:00+00:00" format:"date-time"` ModifiedDate *time.Time `json:"modified_date" example:"2018-03-31T01:29:00+00:00" format:"date-time"` Iava string `json:"-"` Description string `json:"description" example:"description text"` Cvss2Score string `json:"cvss2_score" example:"5.600"` Cvss2Metrics string `json:"cvss2_metrics" example:"AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N"` Source string `json:"-"` CWEs []string `json:"cwe_list" example:"CWE-20"` PkgIDs []int `json:"-"` ErratumIDs []ErratumID `json:"-"` Errata []string `json:"errata_list" example:"RHSA-2015:1981"` Packages []string `json:"package_list" example:"nss-devel-3.16.1-9.el6_5.x86_64"` SourcePackages []string `json:"source_package_list" example:"nss-devel-3.16.1-9.el6_5.src"` }
type CveDetails ¶ added in v1.13.0
type CveIDString ¶ added in v1.20.0
type Cves ¶ added in v1.13.0
type Cves struct { Cves CveDetails `json:"cve_list"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` utils.Pagination }
type CvesRequest ¶ added in v1.13.0
type CvesRequest struct { Cves []string `json:"cve_list" example:"CVE-2017-57.*" minItems:"1" validate:"required"` PublishedSince *time.Time `json:"published_since" example:"2018-04-05T01:23:45+02:00" format:"date-time"` ModifiedSince *time.Time `json:"modified_since" example:"2018-04-05T01:23:45+02:00" format:"date-time"` RHOnly bool `json:"rh_only"` // Return only those CVEs which are associated with at least one errata. Defaults to false. AreErrataAssociated bool `json:"errata_associated"` // Include content from \"third party\" repositories into the response, disabled by default. ThirdParty bool `json:"third_party" default:"false"` utils.PaginationRequest }
type DBChange ¶
type DBChange struct { ErrataChanges time.Time `json:"errata_changes" example:"2024-11-20T12:24:23.488871Z"` CveChanges time.Time `json:"cve_changes" example:"2024-11-20T12:26:20.009512Z"` RepoChanges time.Time `json:"repository_changes" example:"2024-11-20T12:24:23.486827Z"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` Exported time.Time `json:"exported" example:"2024-11-20T12:37:47.605526Z"` }
@Description VMaaS DB last-updated time stramps
type Errata ¶ added in v1.14.0
type Errata struct { Errata ErratumDetails `json:"errata_list"` Type TypeT `json:"type,omitempty" example:"security"` Severity SeverityT `json:"severity,omitempty" enums:"Low,Moderate,Important,Critical,null"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` utils.Pagination }
type ErrataRequest ¶ added in v1.14.0
type ErrataRequest struct { Errata []string `json:"errata_list" example:"RHSA-2018:05.*" minItems:"1" validate:"required"` ModifiedSince *time.Time `json:"modified_since" example:"2018-04-05T01:23:45+02:00" format:"date-time"` // Include content from \"third party\" repositories into the response, disabled by default. ThirdParty bool `json:"third_party" default:"false"` Type TypeT `json:"type" example:"security"` Severity SeverityT `json:"severity" enums:"Low,Moderate,Important,Critical,null"` utils.PaginationRequest }
type ErratumDetail ¶ added in v0.7.1
type ErratumDetail struct { Synopsis string `json:"synopsis" example:"Important: kernel security and bug fix update"` Summary string `json:"summary" example:"summary text"` Type string `json:"type" example:"security"` Severity *string `json:"severity" enums:"Low,Moderate,Important,Critical,null"` Description string `json:"description" example:"description text"` Solution string `json:"solution" example:"solution text"` URL string `json:"url" example:"https://access.redhat.com/errata/RHSA-2018:0512"` ThirdParty bool `json:"third_party"` RequiresReboot bool `json:"requires_reboot"` ID ErratumID `json:"-"` Issued *time.Time `json:"issued" example:"2018-03-13T17:31:28+00:00" format:"date-time"` Updated *time.Time `json:"updated" example:"2018-03-13T17:31:41+00:00"` CVEs []string `json:"cve_list" example:"CVE-2017-5715"` PkgIDs []int `json:"-"` Bugzillas []string `json:"bugzilla_list" example:"1519778"` Refs []string `json:"reference_list" example:"classification-RHSA-2018:0512"` Modules []Module `json:"modules_list"` PackageList []string `json:"package_list" example:"kernel-2.6.32-696.23.1.el6.x86_64"` SourcePackageList []string `json:"source_package_list" example:"kernel-2.6.32-696.23.1.el6.src"` ReleaseVersions []string `json:"release_versions" example:"8.1"` }
type ErratumDetails ¶ added in v1.26.1
type ErratumDetails map[string]ErratumDetail
type ModuleStream ¶
type ModuleStream struct { Module string `json:"module_name"` Stream string `json:"module_stream"` }
func (*ModuleStream) Scan ¶ added in v1.3.0
func (ms *ModuleStream) Scan(value interface{}) error
Implement the Scan method for the ModuleStream type
type ModuleStreamPtrs ¶ added in v0.4.3
type NevraString ¶
type OSReleaseDetail ¶ added in v1.16.0
type OSReleaseDetail struct { Name string `json:"name"` Major int `json:"major"` Minor int `json:"minor"` LifecyclePhase string `json:"lifecycle_phase"` SystemProfile string `json:"-"` CvesCritical int `json:"cves_critical"` CvesImportant int `json:"cves_important"` CvesModerate int `json:"cves_moderate"` CvesLow int `json:"cves_low"` CvesUnpatchedCritical int `json:"cves_unpatched_critical"` CvesUnpatchedImportant int `json:"cves_unpatched_important"` CvesUnpatchedModerate int `json:"cves_unpatched_moderate"` CvesUnpatchedLow int `json:"cves_unpatched_low"` }
type Option ¶ added in v1.0.0
type Option interface {
// contains filtered or unexported methods
}
func WithExcludedPackages ¶ added in v1.9.0
Option to set excluded package names
func WithExcludedReleases ¶ added in v1.14.2
Option to set excluded package releases
func WithMaxGoroutines ¶ added in v1.0.0
Option to set maximum number of goroutines used by the lib
func WithNewerReleaseverCsaf ¶ added in v1.11.3
Option to look for updates/cves in newer release version when evaluating from CSAF
func WithNewerReleaseverRepos ¶ added in v1.11.3
Option to look for updates/cves in newer release version when evaluating from repositories
func WithUnfixed ¶ added in v1.0.0
Option to evaluate unfixed CVEs by CSAF
func WithVmaasVersionFilePath ¶ added in v1.27.0
Option that specifies VMaaS version file path
type PackageDetail ¶
type PackageDetailResponse ¶ added in v1.18.0
type PackageDetailResponse struct { Summary string `json:"summary" example:"package summary"` Description string `json:"description" example:"package description"` SourcePackage string `json:"source_package" example:"kernel-2.6.32-696.23.1.el6.src"` Packages []string `json:"package_list" example:"kernel-2.6.32-696.23.1.el6.x86_64"` Repositories []RepoDetailCommon `json:"repositories"` }
type PackageDetails ¶ added in v1.18.0
type PackageDetails map[string]interface{}
type Packages ¶ added in v1.18.0
type Packages struct { Packages PackageDetails `json:"package_list"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` }
type PackagesRequest ¶ added in v1.18.0
type ParsedCpe ¶ added in v1.4.0
type ParsedCpe struct { Part *string Vendor *string Product *string Version *string Update *string Edition *string Language *string }
func (*ParsedCpe) CmpByVersion ¶ added in v1.20.0
type PkgErratum ¶ added in v0.7.1
type PkgList ¶ added in v1.19.0
type PkgList struct { PkgList []PkgListItem `json:"package_list"` // Total number of packages to return. Total int `json:"total" example:"100"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` utils.Pagination }
type PkgListItem ¶ added in v1.19.0
type PkgListItem struct { Nevra string `json:"nevra" example:"kernel-rt-4.18.0-147.rt24.93.el8.x86_64"` Summary string `json:"summary" example:"My package summary"` Description string `json:"description" example:"My package description"` Modified *time.Time `json:"modified,omitempty" example:"2018-04-05T01:23:45+02:00" format:"date-time"` }
type PkgListRequest ¶ added in v1.19.0
type PkgListRequest struct { ModifiedSince *time.Time `json:"modified_since" example:"2018-04-05T01:23:45+02:00" format:"date-time"` // Include 'modified' package attribute into the response ReturnModified bool `json:"return_modified" default:"false"` utils.PaginationRequest }
type PkgTree ¶ added in v1.21.0
type PkgTree struct { PackageNames PkgTreeItems `json:"package_name_list"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` utils.Pagination }
type PkgTreeErratumDetail ¶ added in v1.21.0
type PkgTreeErratumDetail struct { Name string `json:"name" example:"RHSA-2019:2730" validate:"required"` Issued *time.Time `json:"issued" example:"2019-11-19T09:41:05+00:00" format:"date-time" validate:"required"` Updated *time.Time `json:"updated" example:"2019-11-19T09:41:05+00:00" format:"date-time"` CVEs []string `json:"cve_list" example:"CVE-2018-13405"` }
type PkgTreeItem ¶ added in v1.21.0
type PkgTreeItem struct { // Example: kernel-rt-4.18.0-147.rt24.93.el8.x86_64 Nevra string `json:"nevra" validate:"required"` Summary string `json:"summary,omitempty" example:"My package summary"` Description string `json:"description,omitempty" example:"My package description"` // Example: 2020-01-13T17:31:41+00:00 FirstPublished *time.Time `json:"first_published,omitempty" format:"date-time" validate:"required"` Repositories *[]PkgTreeRepoDetail `json:"repositories,omitempty"` Errata *[]PkgTreeErratumDetail `json:"errata,omitempty"` }
type PkgTreeItems ¶ added in v1.21.0
type PkgTreeItems map[string][]PkgTreeItem
type PkgTreeRepoDetail ¶ added in v1.21.0
type PkgTreeRepoDetail struct { RepoDetailCommon Revision string `json:"revision" example:"2019-11-19T09:41:05+00:00" format:"date-time" validate:"required"` }
type PkgTreeRequest ¶ added in v1.21.0
type PkgTreeRequest struct { PackageNames []string `json:"package_name_list" example:"kernel-rt" minItems:"1" validate:"required"` ModifiedSince *time.Time `json:"modified_since" example:"2018-04-05T01:23:45+02:00" format:"date-time"` // Include content from "third party" repositories into the response, disabled by default. ThirdParty bool `json:"third_party" default:"false"` // Include nevra repositories info into the response. ReturnRepositories *bool `json:"return_repositories" default:"true"` // Include nevra errata info into the response. ReturnErrata *bool `json:"return_errata" default:"true"` // Include nevra summary info into the response. ReturnSummary bool `json:"return_summary" default:"false"` // Include nevra description info into the response. ReturnDescription bool `json:"return_description" default:"false"` utils.PaginationRequest }
type ProcessedRequest ¶
type ProcessedRequest struct { Updates *Updates Packages []NevraString Variants []VariantSuffix NewerVariants []VariantSuffix ContentSetVariants []VariantSuffix Cpes []CpeID NewerCpes []CpeID ContentSetCpes []CpeID OriginalRequest *Request }
type ProductsPackage ¶ added in v1.4.0
type ProductsPackage struct { ProductsFixed []CSAFProductID ProductsUnfixed []CSAFProductID ProductsFixedNewerRelease []CSAFProductID Package Package }
type RPMPkgNames ¶ added in v1.24.0
type RPMPkgNames struct { Names ContentData `json:"rpm_name_list"` // TODO: use `omitzero` from go1.24 LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` }
type RPMPkgNamesRequest ¶ added in v1.24.0
type ReleaseGraph ¶ added in v1.29.0
type ReleaseGraph struct { GetByVariant map[VariantSuffix]*ReleaseNode GetByCpe map[CpeLabel][]*ReleaseNode }
func (*ReleaseGraph) GetAncestors ¶ added in v1.29.0
func (g *ReleaseGraph) GetAncestors(variant VariantSuffix) []*ReleaseNode
Get all parent nodes (ancestors) of a node by a node id - product variant suffix
type ReleaseGraphRaw ¶ added in v1.31.0
type ReleaseGraphRaw struct { Nodes map[string]struct { Type string `json:"type"` CPEs []CpeLabel `json:"cpes"` } `json:"nodes"` Edges map[string][]string `json:"edges"` }
func (*ReleaseGraphRaw) BuildGraph ¶ added in v1.31.0
func (raw *ReleaseGraphRaw) BuildGraph(cpeID2Label map[CpeID]CpeLabel) *ReleaseGraph
Build the ReleaseGraph tree structure
type ReleaseNode ¶ added in v1.29.0
type ReleaseNode struct { VariantSuffix VariantSuffix Type string CPEs []CpeLabel Children []*ReleaseNode Parent *ReleaseNode }
func (*ReleaseNode) GetAncestors ¶ added in v1.31.0
func (n *ReleaseNode) GetAncestors() []*ReleaseNode
Get all parent nodes (ancestors) of a node
type RepoDetail ¶
type RepoDetail struct { RepoDetailCommon URL string `json:"url" example:"https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/os/"` Product string `json:"product" example:"Red Hat Enterprise Linux Server"` ProductID int `json:"-"` Revision string `json:"revision" example:"2018-03-27T10:55:16+00:00"` LastChange *time.Time `json:"last_change"` ThirdParty bool `json:"third_party"` CPEs []CpeLabel `json:"cpes" example:"cpe:/a:redhat"` UpdatedPackageNames *[]string `json:"updated_package_names,omitempty" example:"kernel"` }
type RepoDetailCommon ¶ added in v1.18.0
type RepoDetailCommon struct { Label string `json:"label" example:"rhel-6-server-rpms" validate:"required"` Name string `json:"name" example:"Red Hat Enterprise Linux 6 Server (RPMs)" validate:"required"` Basearch string `json:"basearch" example:"x86_64" validate:"required"` Releasever string `json:"releasever" example:"6Server" validate:"required"` Organization string `json:"organization"` }
type RepoDetails ¶ added in v1.17.0
type RepoDetails map[string][]RepoDetail
type Repos ¶ added in v1.17.0
type Repos struct { Repos RepoDetails `json:"repository_list"` LatestRepoChange *time.Time `json:"latest_repo_change,omitempty" example:"2024-11-20T12:36:49.640592Z"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` utils.Pagination }
type ReposRequest ¶ added in v1.17.0
type ReposRequest struct { Repos []string `json:"repository_list" example:"rhel-6-server-rpms" minItems:"1" validate:"required"` // Return only repositories changed after the given date ModifiedSince *time.Time `json:"modified_since" example:"2018-04-05T01:23:45+02:00" format:"date-time"` // Include content from \"third party\" repositories into the response, disabled by default. ThirdParty bool `json:"third_party" default:"false"` // Show updated package names in a repo since the last modified_since ShowPackages bool `json:"show_packages" default:"false"` // Return only repositories having advisories with packages released since the last modified_since HasPackages bool `json:"has_packages" default:"false"` Organization string `json:"organization"` utils.PaginationRequest }
type Request ¶
type Request struct { Packages []string `json:"package_list" example:"kernel-2.6.32-696.20.1.el6.x86_64" validate:"required"` Repos *[]string `json:"repository_list" example:"rhel-6-server-rpms"` Modules []ModuleStreamPtrs `json:"modules_list"` Releasever *string `json:"releasever" example:"6Server"` Basearch *string `json:"basearch" example:"x86_64"` RepoPaths []string `json:"repository_paths" example:"/content/dist/rhel/rhui/server/7/7Server/x86_64/os/"` // Include content from "third party" repositories into the response, disabled by default. ThirdParty bool `json:"third_party" default:"false"` LatestOnly bool `json:"latest_only"` SecurityOnly bool `json:"security_only"` Extended bool `json:"extended"` EpochRequired bool `json:"epoch_required"` Organization string `json:"organization"` }
type SRPMPkgNames ¶ added in v1.25.0
type SRPMPkgNamesRequest ¶ added in v1.25.0
type SeverityT ¶ added in v1.14.7
type SeverityT []*string
func (*SeverityT) UnmarshalJSON ¶ added in v1.14.7
type Update ¶
type Update struct { Package string `json:"package" example:"kernel-2.6.32-696.23.1.el6.x86_64"` PackageName string `json:"package_name" example:"kernel"` EVRA string `json:"evra" example:"0:2.6.32-696.23.1.el6.x86_64"` Erratum string `json:"erratum" example:"RHSA-2018:0512"` Repository string `json:"repository" example:"rhel-6-server-rpms"` Basearch string `json:"basearch" example:"x86_64"` Releasever string `json:"releasever" example:"6Server"` // contains filtered or unexported fields }
type UpdateDetail ¶
type UpdateDetail struct {
AvailableUpdates []Update `json:"available_updates,omitempty"`
}
type UpdateList ¶
type UpdateList map[string]UpdateDetail
type Updates ¶
type Updates struct { UpdateList UpdateList `json:"update_list"` RepoList *[]string `json:"repository_list,omitempty" example:"rhel-6-server-rpms"` // Example: /content/dist/rhel/rhui/server/7/7Server/x86_64/os/ RepoPaths []string `json:"repository_paths,omitempty"` ModuleList []ModuleStream `json:"modules_list,omitempty"` Releasever *string `json:"releasever,omitempty" example:"6Server"` Basearch *string `json:"basearch,omitempty" example:"x86_64"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` }
type VariantSuffix ¶ added in v1.30.0
type VariantSuffix string
func (*VariantSuffix) Compare ¶ added in v1.31.2
func (x *VariantSuffix) Compare(y *VariantSuffix) int
Compare compares this variant to another variant. Returns -1, 0, or 1 if this variant is smaller, equal, or larger than the other variant.
func (*VariantSuffix) Split ¶ added in v1.31.2
func (x *VariantSuffix) Split() ([]string, string)
Split variant into slice of version numbers followed by string
type Vulnerabilities ¶
type Vulnerabilities struct { CVEs []Vulnerability `json:"cve_list" validate:"required"` ManuallyFixableCVEs []Vulnerability `json:"manually_fixable_cve_list" validate:"required"` UnpatchedCVEs []Vulnerability `json:"unpatched_cve_list" validate:"required"` LastChange time.Time `json:"last_change" example:"2024-11-20T12:36:49.640592Z"` }
type VulnerabilitiesCvesDetails ¶
type VulnerabilitiesCvesDetails struct { Cves map[string]VulnerabilityDetail ManualCves map[string]VulnerabilityDetail UnpatchedCves map[string]VulnerabilityDetail LastChange *time.Time }
type VulnerabilitiesExtended ¶
type VulnerabilitiesExtended struct { CVEs []VulnerabilityDetail `json:"cve_list"` ManuallyFixableCVEs []VulnerabilityDetail `json:"manually_fixable_cve_list"` UnpatchedCVEs []VulnerabilityDetail `json:"unpatched_cve_list"` LastChange time.Time `json:"last_change"` }
type Vulnerability ¶
type Vulnerability string
type VulnerabilityDetail ¶
type VulnerabilityDetail struct { CVE string `json:"cve"` Packages map[string]bool Errata map[string]bool Affected []AffectedPackage `json:"affected,omitempty"` }
func (VulnerabilityDetail) MarshalJSON ¶ added in v1.0.6
func (d VulnerabilityDetail) MarshalJSON() ([]byte, error)
marshal VulnerabilityDetail Packages and Errata as json arrays for backward compatibility
type VulnerabilityReport ¶ added in v1.16.0
type VulnerabilityReport struct { OSReleases []OSReleaseDetail `json:"os_releases"` LastChange time.Time `json:"last_change"` }