Documentation ¶
Index ¶
- Constants
- type Alpine
- func (o *Alpine) GetByCveID(osVer, cveID string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Alpine) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Alpine) InsertOval(root *models.Root, meta models.FetchMeta, driver *gorm.DB) error
- func (o *Alpine) Name() string
- type Amazon
- func (o *Amazon) GetByCveID(osVer, cveID string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Amazon) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Amazon) InsertOval(root *models.Root, meta models.FetchMeta, driver *gorm.DB) error
- func (o *Amazon) Name() string
- type Debian
- func (o *Debian) GetByCveID(osVer, cveID string, driver *gorm.DB) (defs []models.Definition, err error)
- func (o *Debian) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Debian) InsertOval(root *models.Root, meta models.FetchMeta, driver *gorm.DB) error
- func (o *Debian) Name() string
- type Driver
- func (d *Driver) CloseDB() (err error)
- func (d *Driver) CountDefs(osFamily, osVer string) (int, error)
- func (d *Driver) GetByCveID(osVer, cveID string) ([]models.Definition, error)
- func (d *Driver) GetByPackName(osVer, packName string) ([]models.Definition, error)
- func (d *Driver) GetLastModified(osFamily, osVer string) time.Time
- func (d *Driver) InsertFetchMeta(meta models.FetchMeta) error
- func (d *Driver) InsertOval(root *models.Root, meta models.FetchMeta) error
- func (d *Driver) MigrateDB() error
- func (d *Driver) Name() string
- func (d *Driver) NewOvalDB(family string) error
- func (d *Driver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)
- type Oracle
- func (o *Oracle) GetByCveID(osVer, cveID string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Oracle) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Oracle) InsertOval(root *models.Root, meta models.FetchMeta, driver *gorm.DB) error
- func (o *Oracle) Name() string
- type OvalDB
- type RedHat
- func (o *RedHat) GetByCveID(osVer, cveID string, driver *gorm.DB) ([]models.Definition, error)
- func (o *RedHat) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
- func (o *RedHat) InsertOval(root *models.Root, meta models.FetchMeta, driver *gorm.DB) error
- func (o *RedHat) Name() string
- type SUSE
- func (o *SUSE) GetByCveID(osVer, cveID string, driver *gorm.DB) (defs []models.Definition, err error)
- func (o *SUSE) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
- func (o *SUSE) InsertOval(root *models.Root, meta models.FetchMeta, driver *gorm.DB) error
- func (o *SUSE) Name() string
- type Ubuntu
- func (o *Ubuntu) GetByCveID(osVer, cveID string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Ubuntu) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
- func (o *Ubuntu) InsertOval(root *models.Root, meta models.FetchMeta, driver *gorm.DB) error
- func (o *Ubuntu) Name() string
Constants ¶
const ( DialectSqlite3 = "sqlite3" DialectMysql = "mysql" DialectPostgreSQL = "postgres" )
Supported DB dialects.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alpine ¶
type Alpine struct {
Family string
}
Alpine is a struct for DBAccess
func (*Alpine) GetByCveID ¶
GetByCveID select definitions by CveID
func (*Alpine) GetByPackName ¶
func (o *Alpine) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*Alpine) InsertOval ¶
InsertOval inserts Alpine secdb information as OVAL format
type Amazon ¶
type Amazon struct {
Family string
}
Amazon is a struct for DBAccess
func (*Amazon) GetByCveID ¶
GetByCveID select definitions by CveID
func (*Amazon) GetByPackName ¶
func (o *Amazon) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*Amazon) InsertOval ¶
InsertOval inserts Amazon ALAS information as OVAL format
type Debian ¶
type Debian struct {
Family string
}
Debian is a struct of DBAccess
func (*Debian) GetByCveID ¶
func (o *Debian) GetByCveID(osVer, cveID string, driver *gorm.DB) (defs []models.Definition, err error)
GetByCveID select definitions by CveID
func (*Debian) GetByPackName ¶
func (o *Debian) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*Debian) InsertOval ¶
InsertOval inserts Debian OVAL
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is Driver for RDB
func (*Driver) GetByCveID ¶
func (d *Driver) GetByCveID(osVer, cveID string) ([]models.Definition, error)
GetByCveID select OVAL definition related to OS Family, osVer, cveID
func (*Driver) GetByPackName ¶
func (d *Driver) GetByPackName(osVer, packName string) ([]models.Definition, error)
GetByPackName select OVAL definition related to OS Family, osVer, packName
func (*Driver) GetLastModified ¶
GetLastModified get last modified time of OVAL in roots
func (*Driver) InsertFetchMeta ¶
InsertFetchMeta inserts FetchMeta
func (*Driver) InsertOval ¶
InsertOval inserts OVAL
type Oracle ¶
type Oracle struct {
Family string
}
Oracle is a struct of DBAccess
func (*Oracle) GetByCveID ¶
GetByCveID select definitions by CveID
func (*Oracle) GetByPackName ¶
func (o *Oracle) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*Oracle) InsertOval ¶
InsertOval inserts Oracle OVAL
type OvalDB ¶
type OvalDB interface { Name() string GetByPackName(string, string, *gorm.DB) ([]models.Definition, error) GetByCveID(string, string, *gorm.DB) ([]models.Definition, error) InsertOval(*models.Root, models.FetchMeta, *gorm.DB) error }
OvalDB is a interface of RedHat, Debian
type RedHat ¶
type RedHat struct {
Family string
}
RedHat is a struct for DBAccess
func (*RedHat) GetByCveID ¶
GetByCveID select definitions by CveID
func (*RedHat) GetByPackName ¶
func (o *RedHat) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*RedHat) InsertOval ¶
InsertOval inserts RedHat OVAL
type SUSE ¶
type SUSE struct {
Family string
}
SUSE is a struct of DBAccess
func (*SUSE) GetByCveID ¶
func (o *SUSE) GetByCveID(osVer, cveID string, driver *gorm.DB) (defs []models.Definition, err error)
GetByCveID select definitions by CveID SUSE : OVAL is separate for each minor version. So select OVAL by major.minimor version. http: //ftp.suse.com/pub/projects/security/oval/
func (*SUSE) GetByPackName ¶
GetByPackName select definitions by packName SUSE : OVAL is separate for each minor version. So select OVAL by major.minimor version. http: //ftp.suse.com/pub/projects/security/oval/
func (*SUSE) InsertOval ¶
InsertOval inserts SUSE OVAL
type Ubuntu ¶
type Ubuntu struct {
Family string
}
Ubuntu is a struct for DBAccess
func (*Ubuntu) GetByCveID ¶
GetByCveID select definitions by CveID
func (*Ubuntu) GetByPackName ¶
func (o *Ubuntu) GetByPackName(osVer, packName string, driver *gorm.DB) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*Ubuntu) InsertOval ¶
InsertOval inserts Ubuntu OVAL