Documentation ¶
Index ¶
- Variables
- type DB
- type Option
- type RDBDriver
- func (r *RDBDriver) CloseDB() (err error)
- func (r *RDBDriver) GetAttackerIDsByTechniqueIDs(techniqueIDs []string) ([]string, error)
- func (r *RDBDriver) GetCtiByCtiID(ctiID string) (models.CTI, error)
- func (r *RDBDriver) GetCtisByMultiCtiID(ctiIDs []string) ([]models.CTI, error)
- func (r *RDBDriver) GetFetchMeta() (fetchMeta *models.FetchMeta, err error)
- func (r *RDBDriver) GetTechniqueIDsByCveID(cveID string) ([]string, error)
- func (r *RDBDriver) GetTechniqueIDsByMultiCveID(cveIDs []string) (map[string][]string, error)
- func (r *RDBDriver) InsertCti(techniques []models.Technique, mappings []models.CveToTechniques, ...) (err error)
- func (r *RDBDriver) IsGoCTIModelV1() (bool, error)
- func (r *RDBDriver) MigrateDB() error
- func (r *RDBDriver) Name() string
- func (r *RDBDriver) OpenDB(dbType, dbPath string, debugSQL bool, _ Option) (err error)
- func (r *RDBDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
- type RedisDriver
- func (r *RedisDriver) CloseDB() (err error)
- func (r *RedisDriver) GetAttackerIDsByTechniqueIDs(techniqueIDs []string) ([]string, error)
- func (r *RedisDriver) GetCtiByCtiID(ctiID string) (models.CTI, error)
- func (r *RedisDriver) GetCtisByMultiCtiID(ctiIDs []string) ([]models.CTI, error)
- func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
- func (r *RedisDriver) GetTechniqueIDsByCveID(cveID string) ([]string, error)
- func (r *RedisDriver) GetTechniqueIDsByMultiCveID(cveIDs []string) (map[string][]string, error)
- func (r *RedisDriver) InsertCti(techniques []models.Technique, mappings []models.CveToTechniques, ...) error
- func (r *RedisDriver) IsGoCTIModelV1() (bool, error)
- func (r *RedisDriver) MigrateDB() error
- func (r *RedisDriver) Name() string
- func (r *RedisDriver) OpenDB(_, dbPath string, _ bool, option Option) error
- func (r *RedisDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDBLocked = xerrors.New("database is locked")
ErrDBLocked :
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Name() string OpenDB(dbType, dbPath string, debugSQL bool, option Option) error MigrateDB() error CloseDB() error IsGoCTIModelV1() (bool, error) GetFetchMeta() (*models.FetchMeta, error) UpsertFetchMeta(*models.FetchMeta) error InsertCti([]models.Technique, []models.CveToTechniques, []models.Attacker) error GetCtiByCtiID(string) (models.CTI, error) GetCtisByMultiCtiID([]string) ([]models.CTI, error) GetTechniqueIDsByCveID(string) ([]string, error) GetTechniqueIDsByMultiCveID([]string) (map[string][]string, error) GetAttackerIDsByTechniqueIDs([]string) ([]string, error) }
DB :
type RDBDriver ¶
type RDBDriver struct {
// contains filtered or unexported fields
}
RDBDriver :
func (*RDBDriver) GetAttackerIDsByTechniqueIDs ¶
GetAttackerIDsByTechniqueIDs :
func (*RDBDriver) GetCtiByCtiID ¶
GetCtiByCtiID :
func (*RDBDriver) GetCtisByMultiCtiID ¶
GetCtisByMultiCtiID :
func (*RDBDriver) GetFetchMeta ¶
GetFetchMeta get FetchMeta from Database
func (*RDBDriver) GetTechniqueIDsByCveID ¶
GetTechniqueIDsByCveID :
func (*RDBDriver) GetTechniqueIDsByMultiCveID ¶
GetTechniqueIDsByMultiCveID :
func (*RDBDriver) InsertCti ¶
func (r *RDBDriver) InsertCti(techniques []models.Technique, mappings []models.CveToTechniques, attackers []models.Attacker) (err error)
InsertCti :
func (*RDBDriver) IsGoCTIModelV1 ¶
IsGoCTIModelV1 determines if the DB was created at the time of go-cti Model v1
type RedisDriver ¶
type RedisDriver struct {
// contains filtered or unexported fields
}
RedisDriver is Driver for Redis
func (*RedisDriver) GetAttackerIDsByTechniqueIDs ¶
func (r *RedisDriver) GetAttackerIDsByTechniqueIDs(techniqueIDs []string) ([]string, error)
GetAttackerIDsByTechniqueIDs :
func (*RedisDriver) GetCtiByCtiID ¶
func (r *RedisDriver) GetCtiByCtiID(ctiID string) (models.CTI, error)
GetCtiByCtiID :
func (*RedisDriver) GetCtisByMultiCtiID ¶
func (r *RedisDriver) GetCtisByMultiCtiID(ctiIDs []string) ([]models.CTI, error)
GetCtisByMultiCtiID :
func (*RedisDriver) GetFetchMeta ¶
func (r *RedisDriver) GetFetchMeta() (*models.FetchMeta, error)
GetFetchMeta get FetchMeta from Database
func (*RedisDriver) GetTechniqueIDsByCveID ¶
func (r *RedisDriver) GetTechniqueIDsByCveID(cveID string) ([]string, error)
GetTechniqueIDsByCveID :
func (*RedisDriver) GetTechniqueIDsByMultiCveID ¶
func (r *RedisDriver) GetTechniqueIDsByMultiCveID(cveIDs []string) (map[string][]string, error)
GetTechniqueIDsByMultiCveID :
func (*RedisDriver) InsertCti ¶
func (r *RedisDriver) InsertCti(techniques []models.Technique, mappings []models.CveToTechniques, attackers []models.Attacker) error
InsertCti :
func (*RedisDriver) IsGoCTIModelV1 ¶
func (r *RedisDriver) IsGoCTIModelV1() (bool, error)
IsGoCTIModelV1 determines if the DB was created at the time of go-cti Model v1
func (*RedisDriver) OpenDB ¶
func (r *RedisDriver) OpenDB(_, dbPath string, _ bool, option Option) error
OpenDB opens Database
func (*RedisDriver) UpsertFetchMeta ¶
func (r *RedisDriver) UpsertFetchMeta(fetchMeta *models.FetchMeta) error
UpsertFetchMeta upsert FetchMeta to Database
Click to show internal directories.
Click to hide internal directories.