Documentation ¶
Index ¶
- type DB
- type RDBDriver
- func (r *RDBDriver) CloseDB() (err error)
- func (r *RDBDriver) GetCategories() (cpe models.FilterableCategories, err error)
- func (r *RDBDriver) GetCpeFromCpe22(name string) (cpe models.CategorizedCpe, err error)
- func (r *RDBDriver) GetCpeFromCpe23(name string) (cpe models.CategorizedCpe, err error)
- func (r *RDBDriver) GetFilteredCpe(filters models.FilterableCategories) (cpes []models.CategorizedCpe, err error)
- func (r *RDBDriver) InsertCpes(cpes []models.CategorizedCpe) error
- func (r *RDBDriver) MigrateDB() error
- func (r *RDBDriver) Name() string
- func (r *RDBDriver) OpenDB(dbType, dbPath string, debugSQL bool) (err error)
- type RedisDriver
- func (r *RedisDriver) CloseDB() (err error)
- func (r *RedisDriver) GetCategories() (cpe models.FilterableCategories, err error)
- func (r *RedisDriver) GetCpeFromCpe22(cpeName string) (cpe models.CategorizedCpe, err error)
- func (r *RedisDriver) GetCpeFromCpe23(cpeName string) (cpe models.CategorizedCpe, err error)
- func (r *RedisDriver) GetFilteredCpe(filters models.FilterableCategories) (cpes []models.CategorizedCpe, err error)
- func (r *RedisDriver) InsertCpes(cpes []models.CategorizedCpe) (err error)
- func (r *RedisDriver) Name() string
- func (r *RedisDriver) OpenDB(dbType, dbPath string, debugSQL bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Name() string CloseDB() error GetCpeFromCpe22(string) (models.CategorizedCpe, error) GetCpeFromCpe23(string) (models.CategorizedCpe, error) GetCategories() (models.FilterableCategories, error) GetFilteredCpe(models.FilterableCategories) ([]models.CategorizedCpe, error) InsertCpes([]models.CategorizedCpe) error }
DB is interface for a database driver
type RDBDriver ¶
type RDBDriver struct {
// contains filtered or unexported fields
}
RDBDriver is Driver for RDB
func (*RDBDriver) GetCategories ¶
func (r *RDBDriver) GetCategories() (cpe models.FilterableCategories, err error)
GetCategories : GetCategories
func (*RDBDriver) GetCpeFromCpe22 ¶
func (r *RDBDriver) GetCpeFromCpe22(name string) (cpe models.CategorizedCpe, err error)
GetCpeFromCpe22 Select Cpe information from DB.
func (*RDBDriver) GetCpeFromCpe23 ¶
func (r *RDBDriver) GetCpeFromCpe23(name string) (cpe models.CategorizedCpe, err error)
GetCpeFromCpe23 Select Cpe information from DB.
func (*RDBDriver) GetFilteredCpe ¶
func (r *RDBDriver) GetFilteredCpe(filters models.FilterableCategories) (cpes []models.CategorizedCpe, err error)
GetFilteredCpe : GetFilteredCpe
func (*RDBDriver) InsertCpes ¶
func (r *RDBDriver) InsertCpes(cpes []models.CategorizedCpe) error
InsertCpes inserts Cpe Information into DB
type RedisDriver ¶
type RedisDriver struct {
// contains filtered or unexported fields
}
RedisDriver is Driver for Redis
func NewRedis ¶
func NewRedis(dbType, dbpath string, debugSQL bool) (driver *RedisDriver, err error)
NewRedis return Redis driver
func (*RedisDriver) GetCategories ¶
func (r *RedisDriver) GetCategories() (cpe models.FilterableCategories, err error)
GetCategories : GetCategories
func (*RedisDriver) GetCpeFromCpe22 ¶
func (r *RedisDriver) GetCpeFromCpe22(cpeName string) (cpe models.CategorizedCpe, err error)
GetCpeFromCpe22 Select Cve information from DB.
func (*RedisDriver) GetCpeFromCpe23 ¶
func (r *RedisDriver) GetCpeFromCpe23(cpeName string) (cpe models.CategorizedCpe, err error)
GetCpeFromCpe23 Select Cve information from DB.
func (*RedisDriver) GetFilteredCpe ¶
func (r *RedisDriver) GetFilteredCpe(filters models.FilterableCategories) (cpes []models.CategorizedCpe, err error)
GetFilteredCpe :
func (*RedisDriver) InsertCpes ¶
func (r *RedisDriver) InsertCpes(cpes []models.CategorizedCpe) (err error)
InsertCpes Select Cve information from DB.
Click to show internal directories.
Click to hide internal directories.