Documentation ¶
Index ¶
- func ClearIDRedhat(cve *models.RedhatCVE)
- func ConvertDebian(cveJSONs models.DebianJSON) (cves []models.DebianCVE)
- func ConvertMicrosoft(cveXMLs []models.MicrosoftXML, cveXls []models.MicrosoftBulletinSearch) (cves []models.MicrosoftCVE, msProducts []models.MicrosoftProduct)
- func ConvertRedhat(cveJSONs []models.RedhatCVEJSON) (cves []models.RedhatCVE, err error)
- func ConvertUbuntu(cveJSONs []models.UbuntuCVEJSON) (cves []models.UbuntuCVE)
- type DB
- type IndexChunk
- type RDBDriver
- func (r *RDBDriver) CloseDB() (err error)
- func (r *RDBDriver) GetAfterTimeRedhat(after time.Time) (allCves []models.RedhatCVE, err error)
- func (r *RDBDriver) GetDebian(cveID string) *models.DebianCVE
- func (r *RDBDriver) GetFetchMeta() (fetchMeta *models.FetchMeta, err error)
- func (r *RDBDriver) GetFixedCvesDebian(major, pkgName string) map[string]models.DebianCVE
- func (r *RDBDriver) GetFixedCvesUbuntu(ver, pkgName string) map[string]models.UbuntuCVE
- func (r *RDBDriver) GetMicrosoft(cveID string) *models.MicrosoftCVE
- func (r *RDBDriver) GetMicrosoftMulti(cveIDs []string) map[string]models.MicrosoftCVE
- func (r *RDBDriver) GetRedhat(cveID string) *models.RedhatCVE
- func (r *RDBDriver) GetRedhatMulti(cveIDs []string) map[string]models.RedhatCVE
- func (r *RDBDriver) GetUbuntu(cveID string) *models.UbuntuCVE
- func (r *RDBDriver) GetUnfixedCvesDebian(major, pkgName string) map[string]models.DebianCVE
- func (r *RDBDriver) GetUnfixedCvesMicrosoft(major, pkgName string, detectWillNotFix ...bool) map[string]models.MicrosoftCVE
- func (r *RDBDriver) GetUnfixedCvesRedhat(major, pkgName string, ignoreWillNotFix bool) map[string]models.RedhatCVE
- func (r *RDBDriver) GetUnfixedCvesUbuntu(ver, pkgName string) map[string]models.UbuntuCVE
- func (r *RDBDriver) InsertDebian(cveJSON models.DebianJSON) (err error)
- func (r *RDBDriver) InsertMicrosoft(cveJSON []models.MicrosoftXML, cveXls []models.MicrosoftBulletinSearch) (err error)
- func (r *RDBDriver) InsertRedhat(cveJSONs []models.RedhatCVEJSON) (err error)
- func (r *RDBDriver) InsertUbuntu(cveJSONs []models.UbuntuCVEJSON) (err error)
- func (r *RDBDriver) IsGostModelV1() (bool, error)
- func (r *RDBDriver) MigrateDB() error
- func (r *RDBDriver) Name() string
- func (r *RDBDriver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)
- func (r *RDBDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
- type RedisDriver
- func (r *RedisDriver) CloseDB() (err error)
- func (r *RedisDriver) GetAfterTimeRedhat(time.Time) ([]models.RedhatCVE, error)
- func (r *RedisDriver) GetDebian(cveID string) *models.DebianCVE
- func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
- func (r *RedisDriver) GetFixedCvesDebian(major, pkgName string) map[string]models.DebianCVE
- func (r *RedisDriver) GetFixedCvesUbuntu(major, pkgName string) map[string]models.UbuntuCVE
- func (r *RedisDriver) GetMicrosoft(cveID string) *models.MicrosoftCVE
- func (r *RedisDriver) GetMicrosoftMulti(cveIDs []string) map[string]models.MicrosoftCVE
- func (r *RedisDriver) GetRedhat(cveID string) *models.RedhatCVE
- func (r *RedisDriver) GetRedhatMulti(cveIDs []string) map[string]models.RedhatCVE
- func (r *RedisDriver) GetUbuntu(cveID string) *models.UbuntuCVE
- func (r *RedisDriver) GetUnfixedCvesDebian(major, pkgName string) map[string]models.DebianCVE
- func (r *RedisDriver) GetUnfixedCvesRedhat(major, pkgName string, ignoreWillNotFix bool) (m map[string]models.RedhatCVE)
- func (r *RedisDriver) GetUnfixedCvesUbuntu(major, pkgName string) map[string]models.UbuntuCVE
- func (r *RedisDriver) InsertDebian(cveJSONs models.DebianJSON) error
- func (r *RedisDriver) InsertMicrosoft(cveXMLs []models.MicrosoftXML, xls []models.MicrosoftBulletinSearch) (err error)
- func (r *RedisDriver) InsertRedhat(cveJSONs []models.RedhatCVEJSON) (err error)
- func (r *RedisDriver) InsertUbuntu(cveJSONs []models.UbuntuCVEJSON) (err error)
- func (r *RedisDriver) IsGostModelV1() (bool, error)
- func (r *RedisDriver) MigrateDB() error
- func (r *RedisDriver) Name() string
- func (r *RedisDriver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)
- func (r *RedisDriver) UpsertFetchMeta(*models.FetchMeta) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertDebian ¶
func ConvertDebian(cveJSONs models.DebianJSON) (cves []models.DebianCVE)
ConvertDebian :
func ConvertMicrosoft ¶ added in v0.1.1
func ConvertMicrosoft(cveXMLs []models.MicrosoftXML, cveXls []models.MicrosoftBulletinSearch) (cves []models.MicrosoftCVE, msProducts []models.MicrosoftProduct)
ConvertMicrosoft :
func ConvertRedhat ¶
func ConvertRedhat(cveJSONs []models.RedhatCVEJSON) (cves []models.RedhatCVE, err error)
ConvertRedhat :
func ConvertUbuntu ¶ added in v0.2.0
func ConvertUbuntu(cveJSONs []models.UbuntuCVEJSON) (cves []models.UbuntuCVE)
ConvertUbuntu :
Types ¶
type DB ¶
type DB interface { Name() string OpenDB(string, string, bool) (bool, error) CloseDB() error MigrateDB() error IsGostModelV1() (bool, error) GetFetchMeta() (*models.FetchMeta, error) UpsertFetchMeta(*models.FetchMeta) error GetAfterTimeRedhat(time.Time) ([]models.RedhatCVE, error) GetRedhat(string) *models.RedhatCVE GetRedhatMulti([]string) map[string]models.RedhatCVE GetDebian(string) *models.DebianCVE GetUbuntu(string) *models.UbuntuCVE GetMicrosoft(string) *models.MicrosoftCVE GetMicrosoftMulti([]string) map[string]models.MicrosoftCVE GetUnfixedCvesRedhat(string, string, bool) map[string]models.RedhatCVE GetUnfixedCvesDebian(string, string) map[string]models.DebianCVE GetFixedCvesDebian(string, string) map[string]models.DebianCVE GetUnfixedCvesUbuntu(string, string) map[string]models.UbuntuCVE GetFixedCvesUbuntu(string, string) map[string]models.UbuntuCVE InsertRedhat([]models.RedhatCVEJSON) error InsertDebian(models.DebianJSON) error InsertUbuntu([]models.UbuntuCVEJSON) error InsertMicrosoft([]models.MicrosoftXML, []models.MicrosoftBulletinSearch) error }
DB is interface for a database driver
type IndexChunk ¶ added in v0.2.0
type IndexChunk struct {
From, To int
}
IndexChunk has a starting point and an ending point for Chunk
type RDBDriver ¶
type RDBDriver struct {
// contains filtered or unexported fields
}
RDBDriver is Driver for RDB
func (*RDBDriver) GetAfterTimeRedhat ¶
GetAfterTimeRedhat :
func (*RDBDriver) GetFetchMeta ¶ added in v0.2.0
GetFetchMeta get FetchMeta from Database
func (*RDBDriver) GetFixedCvesDebian ¶ added in v0.1.5
GetFixedCvesDebian gets the CVEs related to debian_release.status = 'resolved', major, pkgName.
func (*RDBDriver) GetFixedCvesUbuntu ¶ added in v0.2.0
GetFixedCvesUbuntu gets the CVEs related to debian_release.status IN ('released'), ver, pkgName.
func (*RDBDriver) GetMicrosoft ¶ added in v0.1.1
func (r *RDBDriver) GetMicrosoft(cveID string) *models.MicrosoftCVE
GetMicrosoft :
func (*RDBDriver) GetMicrosoftMulti ¶ added in v0.1.1
func (r *RDBDriver) GetMicrosoftMulti(cveIDs []string) map[string]models.MicrosoftCVE
GetMicrosoftMulti :
func (*RDBDriver) GetRedhatMulti ¶
GetRedhatMulti :
func (*RDBDriver) GetUnfixedCvesDebian ¶
GetUnfixedCvesDebian gets the CVEs related to debian_release.status = 'open', major, pkgName.
func (*RDBDriver) GetUnfixedCvesMicrosoft ¶ added in v0.1.1
func (r *RDBDriver) GetUnfixedCvesMicrosoft(major, pkgName string, detectWillNotFix ...bool) map[string]models.MicrosoftCVE
GetUnfixedCvesMicrosoft :
func (*RDBDriver) GetUnfixedCvesRedhat ¶
func (r *RDBDriver) GetUnfixedCvesRedhat(major, pkgName string, ignoreWillNotFix bool) map[string]models.RedhatCVE
GetUnfixedCvesRedhat gets the unfixed CVEs.
func (*RDBDriver) GetUnfixedCvesUbuntu ¶ added in v0.2.0
GetUnfixedCvesUbuntu gets the CVEs related to debian_release.status IN ('needed', 'pending'), ver, pkgName.
func (*RDBDriver) InsertDebian ¶
func (r *RDBDriver) InsertDebian(cveJSON models.DebianJSON) (err error)
InsertDebian :
func (*RDBDriver) InsertMicrosoft ¶ added in v0.1.1
func (r *RDBDriver) InsertMicrosoft(cveJSON []models.MicrosoftXML, cveXls []models.MicrosoftBulletinSearch) (err error)
InsertMicrosoft :
func (*RDBDriver) InsertRedhat ¶
func (r *RDBDriver) InsertRedhat(cveJSONs []models.RedhatCVEJSON) (err error)
InsertRedhat :
func (*RDBDriver) InsertUbuntu ¶ added in v0.2.0
func (r *RDBDriver) InsertUbuntu(cveJSONs []models.UbuntuCVEJSON) (err error)
InsertUbuntu :
func (*RDBDriver) IsGostModelV1 ¶ added in v0.2.0
IsGostModelV1 determines if the DB was created at the time of Gost Model v1
type RedisDriver ¶
type RedisDriver struct {
// contains filtered or unexported fields
}
RedisDriver is Driver for Redis
func (*RedisDriver) CloseDB ¶ added in v0.1.9
func (r *RedisDriver) CloseDB() (err error)
CloseDB close Database
func (*RedisDriver) GetAfterTimeRedhat ¶
GetAfterTimeRedhat :
func (*RedisDriver) GetDebian ¶
func (r *RedisDriver) GetDebian(cveID string) *models.DebianCVE
GetDebian :
func (*RedisDriver) GetFetchMeta ¶ added in v0.2.0
func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
GetFetchMeta get FetchMeta from Database
func (*RedisDriver) GetFixedCvesDebian ¶ added in v0.1.5
func (r *RedisDriver) GetFixedCvesDebian(major, pkgName string) map[string]models.DebianCVE
GetFixedCvesDebian : get the CVEs related to debian_release.status = 'resolved', major, pkgName
func (*RedisDriver) GetFixedCvesUbuntu ¶ added in v0.2.0
func (r *RedisDriver) GetFixedCvesUbuntu(major, pkgName string) map[string]models.UbuntuCVE
GetFixedCvesUbuntu :
func (*RedisDriver) GetMicrosoft ¶ added in v0.1.1
func (r *RedisDriver) GetMicrosoft(cveID string) *models.MicrosoftCVE
GetMicrosoft :
func (*RedisDriver) GetMicrosoftMulti ¶ added in v0.1.1
func (r *RedisDriver) GetMicrosoftMulti(cveIDs []string) map[string]models.MicrosoftCVE
GetMicrosoftMulti :
func (*RedisDriver) GetRedhat ¶
func (r *RedisDriver) GetRedhat(cveID string) *models.RedhatCVE
GetRedhat :
func (*RedisDriver) GetRedhatMulti ¶
func (r *RedisDriver) GetRedhatMulti(cveIDs []string) map[string]models.RedhatCVE
GetRedhatMulti :
func (*RedisDriver) GetUbuntu ¶ added in v0.2.0
func (r *RedisDriver) GetUbuntu(cveID string) *models.UbuntuCVE
GetUbuntu :
func (*RedisDriver) GetUnfixedCvesDebian ¶
func (r *RedisDriver) GetUnfixedCvesDebian(major, pkgName string) map[string]models.DebianCVE
GetUnfixedCvesDebian : get the CVEs related to debian_release.status = 'open', major, pkgName
func (*RedisDriver) GetUnfixedCvesRedhat ¶
func (r *RedisDriver) GetUnfixedCvesRedhat(major, pkgName string, ignoreWillNotFix bool) (m map[string]models.RedhatCVE)
GetUnfixedCvesRedhat :
func (*RedisDriver) GetUnfixedCvesUbuntu ¶ added in v0.2.0
func (r *RedisDriver) GetUnfixedCvesUbuntu(major, pkgName string) map[string]models.UbuntuCVE
GetUnfixedCvesUbuntu :
func (*RedisDriver) InsertDebian ¶
func (r *RedisDriver) InsertDebian(cveJSONs models.DebianJSON) error
InsertDebian :
func (*RedisDriver) InsertMicrosoft ¶ added in v0.1.1
func (r *RedisDriver) InsertMicrosoft(cveXMLs []models.MicrosoftXML, xls []models.MicrosoftBulletinSearch) (err error)
InsertMicrosoft :
func (*RedisDriver) InsertRedhat ¶
func (r *RedisDriver) InsertRedhat(cveJSONs []models.RedhatCVEJSON) (err error)
InsertRedhat :
func (*RedisDriver) InsertUbuntu ¶ added in v0.2.0
func (r *RedisDriver) InsertUbuntu(cveJSONs []models.UbuntuCVEJSON) (err error)
InsertUbuntu :
func (*RedisDriver) IsGostModelV1 ¶ added in v0.2.0
func (r *RedisDriver) IsGostModelV1() (bool, error)
IsGostModelV1 determines if the DB was created at the time of Gost Model v1
func (*RedisDriver) OpenDB ¶
func (r *RedisDriver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)
OpenDB opens Database
func (*RedisDriver) UpsertFetchMeta ¶ added in v0.2.0
func (r *RedisDriver) UpsertFetchMeta(*models.FetchMeta) error
UpsertFetchMeta upsert FetchMeta to Database