go-exploitdb: github.com/mozqnet/go-exploitdb/db Index | Files

package db

import "github.com/mozqnet/go-exploitdb/db"

Index

Package Files

db.go rdb.go redis.go

type DB Uses

type DB interface {
    Name() string
    OpenDB(dbType, dbPath string, debugSQL bool) (bool, error)
    MigrateDB() error
    GetExploitByID(string) []*models.Exploit
    GetExploitByCveID(string) []*models.Exploit
    GetExploitMultiByCveID([]string) map[string][]*models.Exploit
    InsertExploit([]*models.Exploit) error
    GetExploitAll() []*models.Exploit
}

DB :

func NewDB Uses

func NewDB(dbType string, dbPath string, debugSQL bool) (driver DB, locked bool, err error)

NewDB :

type RDBDriver Uses

type RDBDriver struct {
    // contains filtered or unexported fields
}

RDBDriver :

func (*RDBDriver) GetExploitAll Uses

func (r *RDBDriver) GetExploitAll() []*models.Exploit

GetExploitAll :

func (*RDBDriver) GetExploitByCveID Uses

func (r *RDBDriver) GetExploitByCveID(cveID string) []*models.Exploit

GetExploitByCveID :

func (*RDBDriver) GetExploitByID Uses

func (r *RDBDriver) GetExploitByID(exploitUniqueID string) []*models.Exploit

GetExploitByID :

func (*RDBDriver) GetExploitMultiByCveID Uses

func (r *RDBDriver) GetExploitMultiByCveID(cveIDs []string) (exploits map[string][]*models.Exploit)

GetExploitMultiByCveID :

func (*RDBDriver) GetExploitMultiByID Uses

func (r *RDBDriver) GetExploitMultiByID(exploitUniqueIDs []string) map[string][]*models.Exploit

GetExploitMultiByID :

func (*RDBDriver) InsertExploit Uses

func (r *RDBDriver) InsertExploit(exploits []*models.Exploit) (err error)

InsertExploit :

func (*RDBDriver) MigrateDB Uses

func (r *RDBDriver) MigrateDB() error

MigrateDB migrates Database

func (*RDBDriver) Name Uses

func (r *RDBDriver) Name() string

Name return db name

func (*RDBDriver) OpenDB Uses

func (r *RDBDriver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)

OpenDB opens Database

type RedisDriver Uses

type RedisDriver struct {
    // contains filtered or unexported fields
}

RedisDriver is Driver for Redis

func (*RedisDriver) GetExploitAll Uses

func (r *RedisDriver) GetExploitAll() (exploits []*models.Exploit)

GetExploitAll :

func (*RedisDriver) GetExploitByCveID Uses

func (r *RedisDriver) GetExploitByCveID(cveID string) (exploits []*models.Exploit)

GetExploitByCveID :

func (*RedisDriver) GetExploitByID Uses

func (r *RedisDriver) GetExploitByID(exploitDBID string) (exploits []*models.Exploit)

GetExploitByID :

func (*RedisDriver) GetExploitMultiByCveID Uses

func (r *RedisDriver) GetExploitMultiByCveID(cveIDs []string) (exploitsMap map[string][]*models.Exploit)

GetExploitMultiByCveID :

func (*RedisDriver) InsertExploit Uses

func (r *RedisDriver) InsertExploit(exploits []*models.Exploit) (err error)

InsertExploit :

func (*RedisDriver) MigrateDB Uses

func (r *RedisDriver) MigrateDB() error

MigrateDB migrates Database

func (*RedisDriver) Name Uses

func (r *RedisDriver) Name() string

Name return db name

func (*RedisDriver) OpenDB Uses

func (r *RedisDriver) OpenDB(dbType, dbPath string, debugSQL bool) (locked bool, err error)

OpenDB opens Database

Package db imports 13 packages (graph) and is imported by 10 packages. Updated 2019-05-17. Refresh now. Tools for package owners.