gost: github.com/knqyf263/gost/db Index | Files

package db

import "github.com/knqyf263/gost/db"

Index

Package Files

db.go debian.go microsoft.go rdb.go redhat.go redis.go

func ClearIDRedhat Uses

func ClearIDRedhat(cve *models.RedhatCVE)

func ConvertDebian Uses

func ConvertDebian(cveJSONs models.DebianJSON) (cves []models.DebianCVE)

func ConvertMicrosoft Uses

func ConvertMicrosoft(cveXMLs []models.MicrosoftXML, cveXls []models.MicrosoftBulletinSearch) (cves []models.MicrosoftCVE, msProducts []models.MicrosoftProduct)

ConvertMicrosoft :

func ConvertRedhat Uses

func ConvertRedhat(cveJSONs []models.RedhatCVEJSON) (cves []models.RedhatCVE, err error)

type DB Uses

type DB interface {
    Name() string
    OpenDB(string, string, bool) (bool, error)
    MigrateDB() error

    GetAfterTimeRedhat(time.Time) ([]models.RedhatCVE, error)
    GetRedhat(string) *models.RedhatCVE
    GetRedhatMulti([]string) map[string]models.RedhatCVE
    GetDebian(string) *models.DebianCVE
    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

    InsertRedhat([]models.RedhatCVEJSON) error
    InsertDebian(models.DebianJSON) error
    InsertMicrosoft([]models.MicrosoftXML, []models.MicrosoftBulletinSearch) error
}

DB is interface for a database driver

func NewDB Uses

func NewDB(dbType, dbPath string, debugSQL bool) (driver DB, locked bool, err error)

NewDB returns db driver

type RDBDriver Uses

type RDBDriver struct {
    // contains filtered or unexported fields
}

RDBDriver is Driver for RDB

func (*RDBDriver) GetAfterTimeRedhat Uses

func (r *RDBDriver) GetAfterTimeRedhat(after time.Time) (allCves []models.RedhatCVE, err error)

func (*RDBDriver) GetDebian Uses

func (r *RDBDriver) GetDebian(cveID string) *models.DebianCVE

func (*RDBDriver) GetMicrosoft Uses

func (r *RDBDriver) GetMicrosoft(cveID string) *models.MicrosoftCVE

GetMicrosoft :

func (*RDBDriver) GetMicrosoftMulti Uses

func (r *RDBDriver) GetMicrosoftMulti(cveIDs []string) map[string]models.MicrosoftCVE

GetMicrosoftMulti :

func (*RDBDriver) GetRedhat Uses

func (r *RDBDriver) GetRedhat(cveID string) *models.RedhatCVE

func (*RDBDriver) GetRedhatMulti Uses

func (r *RDBDriver) GetRedhatMulti(cveIDs []string) map[string]models.RedhatCVE

func (*RDBDriver) GetUnfixedCvesDebian Uses

func (r *RDBDriver) GetUnfixedCvesDebian(major, pkgName string) map[string]models.DebianCVE

func (*RDBDriver) GetUnfixedCvesMicrosoft Uses

func (r *RDBDriver) GetUnfixedCvesMicrosoft(major, pkgName string, detectWillNotFix ...bool) map[string]models.MicrosoftCVE

GetUnfixedCvesMicrosoft :

func (*RDBDriver) GetUnfixedCvesRedhat Uses

func (r *RDBDriver) GetUnfixedCvesRedhat(major, pkgName string, ignoreWillNotFix bool) map[string]models.RedhatCVE

func (*RDBDriver) InsertDebian Uses

func (r *RDBDriver) InsertDebian(cveJSON models.DebianJSON) (err error)

func (*RDBDriver) InsertMicrosoft Uses

func (r *RDBDriver) InsertMicrosoft(cveJSON []models.MicrosoftXML, cveXls []models.MicrosoftBulletinSearch) (err error)

InsertMicrosoft :

func (*RDBDriver) InsertRedhat Uses

func (r *RDBDriver) InsertRedhat(cveJSONs []models.RedhatCVEJSON) (err error)

func (*RDBDriver) MigrateDB Uses

func (r *RDBDriver) MigrateDB() error

MigrateDB migrates Database

func (*RDBDriver) Name Uses

func (r *RDBDriver) Name() string

Name return db name

func (*RDBDriver) OpenDB Uses

func (r *RDBDriver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)

OpenDB opens Database

type RedisDriver Uses

type RedisDriver struct {
    // contains filtered or unexported fields
}

RedisDriver is Driver for Redis

func (*RedisDriver) GetAfterTimeRedhat Uses

func (r *RedisDriver) GetAfterTimeRedhat(time.Time) ([]models.RedhatCVE, error)

GetAfterTimeRedhat :

func (*RedisDriver) GetDebian Uses

func (r *RedisDriver) GetDebian(cveID string) *models.DebianCVE

GetDebian :

func (*RedisDriver) GetMicrosoft Uses

func (r *RedisDriver) GetMicrosoft(cveID string) *models.MicrosoftCVE

GetMicrosoft :

func (*RedisDriver) GetMicrosoftMulti Uses

func (r *RedisDriver) GetMicrosoftMulti(cveIDs []string) map[string]models.MicrosoftCVE

GetMicrosoftMulti :

func (*RedisDriver) GetRedhat Uses

func (r *RedisDriver) GetRedhat(cveID string) *models.RedhatCVE

GetRedhat :

func (*RedisDriver) GetRedhatMulti Uses

func (r *RedisDriver) GetRedhatMulti(cveIDs []string) map[string]models.RedhatCVE

GetRedhatMulti :

func (*RedisDriver) GetUnfixedCvesDebian Uses

func (r *RedisDriver) GetUnfixedCvesDebian(major, pkgName string) (m map[string]models.DebianCVE)

GetUnfixedCvesDebian :

func (*RedisDriver) GetUnfixedCvesRedhat Uses

func (r *RedisDriver) GetUnfixedCvesRedhat(major, pkgName string, ignoreWillNotFix bool) (m map[string]models.RedhatCVE)

GetUnfixedCvesRedhat :

func (*RedisDriver) InsertDebian Uses

func (r *RedisDriver) InsertDebian(cveJSONs models.DebianJSON) error

InsertDebian :

func (*RedisDriver) InsertMicrosoft Uses

func (r *RedisDriver) InsertMicrosoft(cveXMLs []models.MicrosoftXML, xls []models.MicrosoftBulletinSearch) (err error)

InsertMicrosoft :

func (*RedisDriver) InsertRedhat Uses

func (r *RedisDriver) InsertRedhat(cveJSONs []models.RedhatCVEJSON) (err error)

InsertRedhat :

func (*RedisDriver) MigrateDB Uses

func (r *RedisDriver) MigrateDB() error

MigrateDB migrates Database

func (*RedisDriver) Name Uses

func (r *RedisDriver) Name() string

Name return db name

func (*RedisDriver) OpenDB Uses

func (r *RedisDriver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)

OpenDB opens Database

Package db imports 18 packages (graph) and is imported by 10 packages. Updated 2019-09-30. Refresh now. Tools for package owners.