elasticsearch

package
v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 26

Documentation

Index

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) Init

func (db *Database) Init() error

Init initalizes ElasticSearch for use with malice

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

func (db *Database) TestConnection() error

TestConnection tests the ElasticSearch connection

func (*Database) WaitForConnection

func (db *Database) WaitForConnection(ctx context.Context, timeout int) error

WaitForConnection waits for connection to Elasticsearch to be ready

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL