Documentation ¶
Index ¶
- Variables
- type DB
- type Option
- type RDBDriver
- func (r *RDBDriver) CloseDB() (err error)
- func (r *RDBDriver) GetFetchMeta() (fetchMeta *models.FetchMeta, err error)
- func (r *RDBDriver) GetKEVByCveID(cveID string) (Response, error)
- func (r *RDBDriver) GetKEVByMultiCveID(cveIDs []string) (map[string]Response, error)
- func (r *RDBDriver) InsertKEVulns(records []models.KEVuln) (err error)
- func (r *RDBDriver) InsertVulnCheck(records []models.VulnCheck) (err error)
- func (r *RDBDriver) IsGoKEVModelV1() (bool, error)
- func (r *RDBDriver) MigrateDB() error
- func (r *RDBDriver) Name() string
- func (r *RDBDriver) OpenDB(dbType, dbPath string, debugSQL bool, _ Option) (err error)
- func (r *RDBDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
- type RedisDriver
- func (r *RedisDriver) CloseDB() (err error)
- func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
- func (r *RedisDriver) GetKEVByCveID(cveID string) (Response, error)
- func (r *RedisDriver) GetKEVByMultiCveID(cveIDs []string) (map[string]Response, error)
- func (r *RedisDriver) InsertKEVulns(records []models.KEVuln) (err error)
- func (r *RedisDriver) InsertVulnCheck(records []models.VulnCheck) (err error)
- func (r *RedisDriver) IsGoKEVModelV1() (bool, error)
- func (r *RedisDriver) MigrateDB() error
- func (r *RedisDriver) Name() string
- func (r *RedisDriver) OpenDB(_, dbPath string, _ bool, option Option) error
- func (r *RedisDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDBLocked = xerrors.New("database is locked")
ErrDBLocked :
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Name() string OpenDB(dbType, dbPath string, debugSQL bool, option Option) error MigrateDB() error CloseDB() error IsGoKEVModelV1() (bool, error) GetFetchMeta() (*models.FetchMeta, error) UpsertFetchMeta(*models.FetchMeta) error InsertKEVulns([]models.KEVuln) error InsertVulnCheck([]models.VulnCheck) error GetKEVByCveID(string) (Response, error) GetKEVByMultiCveID([]string) (map[string]Response, error) }
DB :
type RDBDriver ¶
type RDBDriver struct {
// contains filtered or unexported fields
}
RDBDriver :
func (*RDBDriver) GetFetchMeta ¶
GetFetchMeta get FetchMeta from Database
func (*RDBDriver) GetKEVByCveID ¶ added in v0.2.0
GetKEVByCveID :
func (*RDBDriver) GetKEVByMultiCveID ¶ added in v0.2.0
GetKEVByMultiCveID :
func (*RDBDriver) InsertKEVulns ¶
InsertKEVulns :
func (*RDBDriver) InsertVulnCheck ¶ added in v0.2.0
InsertVulnCheck :
func (*RDBDriver) IsGoKEVModelV1 ¶
IsGoKEVModelV1 determines if the DB was created at the time of go-kev Model v1
type RedisDriver ¶
type RedisDriver struct {
// contains filtered or unexported fields
}
RedisDriver is Driver for Redis
func (*RedisDriver) GetFetchMeta ¶
func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
GetFetchMeta get FetchMeta from Database
func (*RedisDriver) GetKEVByCveID ¶ added in v0.2.0
func (r *RedisDriver) GetKEVByCveID(cveID string) (Response, error)
GetKEVByCveID :
func (*RedisDriver) GetKEVByMultiCveID ¶ added in v0.2.0
func (r *RedisDriver) GetKEVByMultiCveID(cveIDs []string) (map[string]Response, error)
GetKEVByMultiCveID :
func (*RedisDriver) InsertKEVulns ¶
func (r *RedisDriver) InsertKEVulns(records []models.KEVuln) (err error)
InsertKEVulns :
func (*RedisDriver) InsertVulnCheck ¶ added in v0.2.0
func (r *RedisDriver) InsertVulnCheck(records []models.VulnCheck) (err error)
InsertVulnCheck :
func (*RedisDriver) IsGoKEVModelV1 ¶
func (r *RedisDriver) IsGoKEVModelV1() (bool, error)
IsGoKEVModelV1 determines if the DB was created at the time of go-kev Model v1
func (*RedisDriver) OpenDB ¶
func (r *RedisDriver) OpenDB(_, dbPath string, _ bool, option Option) error
OpenDB opens Database
func (*RedisDriver) UpsertFetchMeta ¶
func (r *RedisDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
UpsertFetchMeta upsert FetchMeta to Database
Click to show internal directories.
Click to hide internal directories.