Documentation ¶
Index ¶
- Constants
- type Alpine
- func (o *Alpine) GetByCveID(driver *gorm.DB, osVer, cveID, _ string) ([]models.Definition, error)
- func (o *Alpine) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
- func (o *Alpine) InsertOval(root *models.Root, meta models.FileMeta, driver *gorm.DB) error
- func (o *Alpine) Name() string
- type Amazon
- func (o *Amazon) GetByCveID(driver *gorm.DB, osVer, cveID, arch string) ([]models.Definition, error)
- func (o *Amazon) GetByPackName(driver *gorm.DB, osVer, packName, arch string) ([]models.Definition, error)
- func (o *Amazon) InsertOval(root *models.Root, meta models.FileMeta, driver *gorm.DB) error
- func (o *Amazon) Name() string
- type Debian
- func (o *Debian) GetByCveID(driver *gorm.DB, osVer, cveID, _ string) ([]models.Definition, error)
- func (o *Debian) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
- func (o *Debian) InsertOval(root *models.Root, meta models.FileMeta, 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(family, osVer, cveID, arch string) ([]models.Definition, error)
- func (d *Driver) GetByPackName(family, osVer, packName, arch string) ([]models.Definition, error)
- func (d *Driver) GetFetchMeta() (fetchMeta *models.FetchMeta, err error)
- func (d *Driver) GetFileMeta(meta models.FileMeta) (models.FileMeta, error)
- func (d *Driver) GetLastModified(osFamily, osVer string) (time.Time, error)
- func (d *Driver) InsertFileMeta(meta models.FileMeta) error
- func (d *Driver) InsertOval(family string, root *models.Root, meta models.FileMeta) error
- func (d *Driver) IsGovalDictModelV1() (bool, 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)
- func (d *Driver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
- type Oracle
- func (o *Oracle) GetByCveID(driver *gorm.DB, osVer, cveID, arch string) ([]models.Definition, error)
- func (o *Oracle) GetByPackName(driver *gorm.DB, osVer, packName, arch string) ([]models.Definition, error)
- func (o *Oracle) InsertOval(root *models.Root, meta models.FileMeta, driver *gorm.DB) error
- func (o *Oracle) Name() string
- type OvalDB
- type RedHat
- func (o *RedHat) GetByCveID(driver *gorm.DB, osVer, cveID, _ string) ([]models.Definition, error)
- func (o *RedHat) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
- func (o *RedHat) InsertOval(root *models.Root, meta models.FileMeta, driver *gorm.DB) (err error)
- func (o *RedHat) Name() string
- type SUSE
- func (o *SUSE) GetByCveID(driver *gorm.DB, osVer, cveID, _ string) ([]models.Definition, error)
- func (o *SUSE) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
- func (o *SUSE) InsertOval(root *models.Root, meta models.FileMeta, driver *gorm.DB) error
- func (o *SUSE) Name() string
- type Ubuntu
- func (o *Ubuntu) GetByCveID(driver *gorm.DB, osVer, cveID, _ string) ([]models.Definition, error)
- func (o *Ubuntu) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
- func (o *Ubuntu) InsertOval(root *models.Root, meta models.FileMeta, 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 definition by CveID
func (*Alpine) GetByPackName ¶
func (o *Alpine) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]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 ¶
func (o *Amazon) GetByCveID(driver *gorm.DB, osVer, cveID, arch string) ([]models.Definition, error)
GetByCveID select definition by CveID
func (*Amazon) GetByPackName ¶
func (o *Amazon) GetByPackName(driver *gorm.DB, osVer, packName, arch string) ([]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 ¶
GetByCveID select definition by CveID
func (*Debian) GetByPackName ¶
func (o *Debian) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]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(family, osVer, cveID, arch string) ([]models.Definition, error)
GetByCveID select OVAL definition related to OS Family, osVer, cveID
func (*Driver) GetByPackName ¶
func (d *Driver) GetByPackName(family, osVer, packName, arch string) ([]models.Definition, error)
GetByPackName select OVAL definition related to OS Family, osVer, packName
func (*Driver) GetFetchMeta ¶ added in v0.5.0
GetFetchMeta get FetchMeta from Database
func (*Driver) GetFileMeta ¶ added in v0.5.0
GetFileMeta :
func (*Driver) GetLastModified ¶
GetLastModified get last modified time of OVAL in roots
func (*Driver) InsertFileMeta ¶ added in v0.5.0
InsertFileMeta inserts FileMeta
func (*Driver) InsertOval ¶
InsertOval inserts OVAL
func (*Driver) IsGovalDictModelV1 ¶ added in v0.5.0
IsGovalDictModelV1 determines if the DB was created at the time of goval-dictionary Model v1
type Oracle ¶
type Oracle struct {
Family string
}
Oracle is a struct of DBAccess
func (*Oracle) GetByCveID ¶
func (o *Oracle) GetByCveID(driver *gorm.DB, osVer, cveID, arch string) ([]models.Definition, error)
GetByCveID select definition by CveID
func (*Oracle) GetByPackName ¶
func (o *Oracle) GetByPackName(driver *gorm.DB, osVer, packName, arch string) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*Oracle) InsertOval ¶
InsertOval inserts Oracle OVAL
type OvalDB ¶
type OvalDB interface { Name() string GetByPackName(*gorm.DB, string, string, string) ([]models.Definition, error) GetByCveID(*gorm.DB, string, string, string) ([]models.Definition, error) InsertOval(*models.Root, models.FileMeta, *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 definition by CveID
func (*RedHat) GetByPackName ¶
func (o *RedHat) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]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 ¶
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 ¶
func (o *SUSE) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
GetByPackName select definitions by packName
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 definition by CveID
func (*Ubuntu) GetByPackName ¶
func (o *Ubuntu) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
GetByPackName select definitions by packName
func (*Ubuntu) InsertOval ¶
InsertOval inserts Ubuntu OVAL