elasticsearch

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ElasticAddr string

ElasticAddr ElasticSearch address to user for connections

Functions

func InitElasticSearch

func InitElasticSearch(addr string) error

InitElasticSearch initalizes ElasticSearch for use with malice

func Start

func Start(docker *client.Docker, logs bool) (types.ContainerJSONBase, error)

Start creates an Elasticsearch container from the image blacktop/elasticsearch

func TestConnection

func TestConnection(addr string) (bool, error)

TestConnection tests the ElasticSearch connection

func WaitForConnection

func WaitForConnection(ctx context.Context, addr string, timeout int) error

WaitForConnection waits for connection to Elasticsearch to be ready

func WriteFileToDatabase

func WriteFileToDatabase(sample map[string]interface{}) elastic.IndexResponse

WriteFileToDatabase inserts sample into Database

func WriteHashToDatabase

func WriteHashToDatabase(hash string) elastic.IndexResponse

WriteHashToDatabase inserts sample into Database

func WritePluginResultsToDatabase

func WritePluginResultsToDatabase(results PluginResults)

WritePluginResultsToDatabase upserts plugin results into Database

Types

type PluginResults

type PluginResults struct {
	ID       string `json:"id"`
	Name     string
	Category string
	Data     map[string]interface{}
}

PluginResults a malice plugin results object

Jump to

Keyboard shortcuts

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