Documentation
¶
Index ¶
- type Database
- func (db *Database) Init() error
- func (db *Database) StoreFileInfo(sample map[string]interface{}) (elastic.IndexResponse, error)
- func (db *Database) StoreHash(hash string) (elastic.IndexResponse, error)
- func (db *Database) StorePluginResults(results database.PluginResults) error
- func (db *Database) TestConnection() error
- func (db *Database) WaitForConnection(ctx context.Context, timeout int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
Host string `json:"host,omitempty"`
Port string `json:"port,omitempty"`
URL string `json:"url,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Index string `json:"index,omitempty"`
Type string `json:"type,omitempty"`
Plugins map[string]interface{} `json:"plugins,omitempty"`
}
Database is the elasticsearch malice database object
func (*Database) StoreFileInfo ¶
func (db *Database) StoreFileInfo(sample map[string]interface{}) (elastic.IndexResponse, error)
StoreFileInfo inserts initial sample info into database creating a placeholder for it
func (*Database) StoreHash ¶
func (db *Database) StoreHash(hash string) (elastic.IndexResponse, error)
StoreHash stores a hash into the database that has been queried via intel-plugins
func (*Database) StorePluginResults ¶
func (db *Database) StorePluginResults(results database.PluginResults) error
StorePluginResults stores a plugin's results in the database by updating the placeholder created by the call to StoreFileInfo
func (*Database) TestConnection ¶
TestConnection tests the ElasticSearch connection
Click to show internal directories.
Click to hide internal directories.