Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool `description:"Enable MongoDB metadata provider"` Name string `description:"MongoDB database name"` Password string `description:"MongoDB database password"` Collection string `description:"MongoDB database collection to use"` Port int `description:"MongoDB server port"` }
Config used to setup a MongoDB metastore provider
type MongoDB ¶
type MongoDB struct { Session *mongo.Session Collection *mongo.Collection }
MongoDB handles the connection to an external Mongo database
func NewMongoDB ¶
NewMongoDB creates a new MongoDB object
func (*MongoDB) CreateEventMeta ¶
func (db *MongoDB) CreateEventMeta(eventMeta *documentstorage.EventMeta) error
CreateEventMeta creates a new event context document
func (*MongoDB) CreateInsight ¶
func (db *MongoDB) CreateInsight(insight *documentstorage.Insight) error
CreateInsight creates an insights document
func (*MongoDB) GetEventMetaByID ¶
func (db *MongoDB) GetEventMetaByID(id string) (*documentstorage.EventMeta, error)
GetEventMetaByID returns a single document matching a given document ID
Click to show internal directories.
Click to hide internal directories.