Documentation ¶
Index ¶
- Variables
- type DB
- type Option
- type RDBDriver
- func (r *RDBDriver) CloseDB() (err error)
- func (r *RDBDriver) GetExploitAll() ([]models.Exploit, error)
- func (r *RDBDriver) GetExploitByCveID(cveID string) ([]models.Exploit, error)
- func (r *RDBDriver) GetExploitByID(exploitUniqueID string) ([]models.Exploit, error)
- func (r *RDBDriver) GetExploitMultiByCveID(cveIDs []string) (map[string][]models.Exploit, error)
- func (r *RDBDriver) GetExploitMultiByID(exploitUniqueIDs []string) (map[string][]models.Exploit, error)
- func (r *RDBDriver) GetFetchMeta() (fetchMeta *models.FetchMeta, err error)
- func (r *RDBDriver) InsertExploit(exploitType models.ExploitType, exploits []models.Exploit) (err error)
- func (r *RDBDriver) IsExploitModelV1() (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) GetExploitAll() ([]models.Exploit, error)
- func (r *RedisDriver) GetExploitByCveID(cveID string) ([]models.Exploit, error)
- func (r *RedisDriver) GetExploitByID(exploitDBID string) ([]models.Exploit, error)
- func (r *RedisDriver) GetExploitMultiByCveID(cveIDs []string) (map[string][]models.Exploit, error)
- func (r *RedisDriver) GetExploitMultiByID(exploitUniqueIDs []string) (map[string][]models.Exploit, error)
- func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
- func (r *RedisDriver) InsertExploit(exploitType models.ExploitType, exploits []models.Exploit) (err error)
- func (r *RedisDriver) IsExploitModelV1() (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
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 CloseDB() error MigrateDB() error GetExploitByID(string) ([]models.Exploit, error) GetExploitMultiByID([]string) (map[string][]models.Exploit, error) GetExploitByCveID(string) ([]models.Exploit, error) GetExploitMultiByCveID([]string) (map[string][]models.Exploit, error) InsertExploit(models.ExploitType, []models.Exploit) error GetExploitAll() ([]models.Exploit, error) IsExploitModelV1() (bool, error) GetFetchMeta() (*models.FetchMeta, error) UpsertFetchMeta(*models.FetchMeta) error }
DB :
type RDBDriver ¶
type RDBDriver struct {
// contains filtered or unexported fields
}
RDBDriver :
func (*RDBDriver) GetExploitAll ¶
GetExploitAll :
func (*RDBDriver) GetExploitByCveID ¶
GetExploitByCveID :
func (*RDBDriver) GetExploitByID ¶
GetExploitByID :
func (*RDBDriver) GetExploitMultiByCveID ¶
GetExploitMultiByCveID :
func (*RDBDriver) GetExploitMultiByID ¶
func (r *RDBDriver) GetExploitMultiByID(exploitUniqueIDs []string) (map[string][]models.Exploit, error)
GetExploitMultiByID :
func (*RDBDriver) GetFetchMeta ¶ added in v0.2.0
GetFetchMeta get FetchMeta from Database
func (*RDBDriver) InsertExploit ¶
func (r *RDBDriver) InsertExploit(exploitType models.ExploitType, exploits []models.Exploit) (err error)
InsertExploit :
func (*RDBDriver) IsExploitModelV1 ¶ added in v0.2.0
IsExploitModelV1 determines if the DB was created at the time of go-exploitdb Model v1
type RedisDriver ¶
type RedisDriver struct {
// contains filtered or unexported fields
}
RedisDriver is Driver for Redis
func (*RedisDriver) CloseDB ¶ added in v0.1.7
func (r *RedisDriver) CloseDB() (err error)
CloseDB close Database
func (*RedisDriver) GetExploitAll ¶
func (r *RedisDriver) GetExploitAll() ([]models.Exploit, error)
GetExploitAll :
func (*RedisDriver) GetExploitByCveID ¶
func (r *RedisDriver) GetExploitByCveID(cveID string) ([]models.Exploit, error)
GetExploitByCveID :
func (*RedisDriver) GetExploitByID ¶
func (r *RedisDriver) GetExploitByID(exploitDBID string) ([]models.Exploit, error)
GetExploitByID :
func (*RedisDriver) GetExploitMultiByCveID ¶
GetExploitMultiByCveID :
func (*RedisDriver) GetExploitMultiByID ¶ added in v0.4.0
func (r *RedisDriver) GetExploitMultiByID(exploitUniqueIDs []string) (map[string][]models.Exploit, error)
GetExploitMultiByID :
func (*RedisDriver) GetFetchMeta ¶ added in v0.2.0
func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
GetFetchMeta get FetchMeta from Database
func (*RedisDriver) InsertExploit ¶
func (r *RedisDriver) InsertExploit(exploitType models.ExploitType, exploits []models.Exploit) (err error)
InsertExploit :
func (*RedisDriver) IsExploitModelV1 ¶ added in v0.2.0
func (r *RedisDriver) IsExploitModelV1() (bool, error)
IsExploitModelV1 determines if the DB was created at the time of go-exploitdb Model v1
func (*RedisDriver) OpenDB ¶
func (r *RedisDriver) OpenDB(_, dbPath string, _ bool, option Option) error
OpenDB opens Database
func (*RedisDriver) UpsertFetchMeta ¶ added in v0.2.0
func (r *RedisDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
UpsertFetchMeta upsert FetchMeta to Database
Click to show internal directories.
Click to hide internal directories.