Documentation ¶
Index ¶
- Constants
- type Alpine
- type Amazon
- type Debian
- type Driver
- func (d *Driver) CloseDB() (err error)
- func (d *Driver) CountDefs(osFamily, osVer string) (int, error)
- func (d *Driver) GetByPackName(family, osVer, packName, arch 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(family string, 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
- type OvalDB
- type RedHat
- type SUSE
- type Ubuntu
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) GetByPackName ¶
func (o *Alpine) GetByPackName(driver *gorm.DB, osVer, packName, _ string) (defs []models.Definition, err 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) 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) GetByPackName ¶
func (o *Debian) GetByPackName(driver *gorm.DB, osVer, packName, _ string) (defs []models.Definition, err 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) 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) 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) GetByPackName ¶
func (o *Oracle) GetByPackName(driver *gorm.DB, osVer, packName, _ 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) 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) 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) GetByPackName ¶
func (o *SUSE) GetByPackName(driver *gorm.DB, osVer, packName, _ string) ([]models.Definition, error)
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) GetByPackName ¶
func (o *Ubuntu) GetByPackName(driver *gorm.DB, osVer, packName, _ string) (defs []models.Definition, err error)
GetByPackName select definitions by packName
func (*Ubuntu) InsertOval ¶
InsertOval inserts Ubuntu OVAL