Documentation ¶
Index ¶
- type DB
- type RedisDriver
- func (d *RedisDriver) CloseDB() (err error)
- func (d *RedisDriver) CountDefs(family, osVer string) (int, error)
- func (d *RedisDriver) GetByCveID(osVer, cveID string) ([]models.Definition, error)
- func (d *RedisDriver) GetByPackName(osVer, packName string) (defs []models.Definition, err error)
- func (d *RedisDriver) GetLastModified(osFamily, osVer string) time.Time
- func (d *RedisDriver) InsertFetchMeta(meta models.FetchMeta) error
- func (d *RedisDriver) InsertOval(root *models.Root, meta models.FetchMeta) (err error)
- func (d *RedisDriver) Name() string
- func (d *RedisDriver) NewOvalDB(family string) error
- func (d *RedisDriver) OpenDB(dbType, dbPath string, debugSQL bool) (err error)
- func (d *RedisDriver) OvalDB() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Name() string NewOvalDB(string) error CloseDB() error GetByPackName(string, string) ([]models.Definition, error) GetByCveID(string, string) ([]models.Definition, error) InsertOval(*models.Root, models.FetchMeta) error InsertFetchMeta(models.FetchMeta) error CountDefs(string, string) (int, error) GetLastModified(string, string) time.Time }
DB is interface for a database driver
type RedisDriver ¶
type RedisDriver struct {
// contains filtered or unexported fields
}
RedisDriver is Driver for Redis
func NewRedis ¶
func NewRedis(family, dbType, dbpath string, debugSQL bool) (driver *RedisDriver, err error)
NewRedis return Redis driver
func (*RedisDriver) CountDefs ¶
func (d *RedisDriver) CountDefs(family, osVer string) (int, error)
CountDefs counts the number of definitions specified by args
func (*RedisDriver) GetByCveID ¶
func (d *RedisDriver) GetByCveID(osVer, cveID string) ([]models.Definition, error)
GetByCveID select OVAL definition related to OS Family, osVer, cveID
func (*RedisDriver) GetByPackName ¶
func (d *RedisDriver) GetByPackName(osVer, packName string) (defs []models.Definition, err error)
GetByPackName select OVAL definition related to OS Family, osVer, packName
func (*RedisDriver) GetLastModified ¶
func (d *RedisDriver) GetLastModified(osFamily, osVer string) time.Time
GetLastModified get last modified time of OVAL in roots
func (*RedisDriver) InsertFetchMeta ¶
func (d *RedisDriver) InsertFetchMeta(meta models.FetchMeta) error
InsertFetchMeta inserts FetchMeta Redis do not use this.
func (*RedisDriver) InsertOval ¶
InsertOval inserts OVAL
func (*RedisDriver) NewOvalDB ¶
func (d *RedisDriver) NewOvalDB(family string) error
NewOvalDB create a OvalDB client
Click to show internal directories.
Click to hide internal directories.