Documentation ¶
Index ¶
- type DB
- type RDBDriver
- func (r *RDBDriver) CloseDB() (err error)
- func (r *RDBDriver) GetByExactTitle(title string) ([]models.CategorizedCpe, error)
- func (r *RDBDriver) GetByLikeTitle(title string) ([]models.CategorizedCpe, 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) (locked 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 InsertCpes([]*models.CategorizedCpe) error GetByExactTitle(string) ([]models.CategorizedCpe, error) GetByLikeTitle(string) ([]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) GetByExactTitle ¶
func (r *RDBDriver) GetByExactTitle(title string) ([]models.CategorizedCpe, error)
GetByExactTitle Returns the CPE strings which exactly matches the title string
func (*RDBDriver) GetByLikeTitle ¶
func (r *RDBDriver) GetByLikeTitle(title string) ([]models.CategorizedCpe, error)
GetByLikeTitle Returns the CPE strings which matches the title as substring
func (*RDBDriver) InsertCpes ¶
func (r *RDBDriver) InsertCpes(cpes []*models.CategorizedCpe) error
InsertCpes inserts Cpe Information into DB
Click to show internal directories.
Click to hide internal directories.