storerMongoDB

package
v0.0.0-...-4338a1b Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Id                bson.ObjectId `json:"_id" bson:"_id,omitempty"`
	SHA256            string        `json:"sha256"`
	SchemaVersion     string        `json:"schema_version"`
	UserId            string        `json:"user_id"`
	SourceId          []string      `json:"source_id"`
	SourceTag         []string      `json:"source_tag"`
	ServiceName       string        `json:"service_name"`
	ServiceVersion    string        `json:"service_version"`
	ServiceConfig     string        `json:"service_config"`
	ObjectCategory    []string      `json:"object_category"`
	ObjectType        string        `json:"object_type"`
	Results           interface{}   `json:"results"`
	Tags              []string      `json:"tags"`
	StartedDateTime   string        `json:"started_date_time"`
	FinishedDateTime  string        `json:"finished_date_time"`
	WatchguardStatus  string        `json:"watchguard_status"`
	WatchguardLog     []string      `json:"watchguard_log"`
	WatchguardVersion string        `json:"watchguard_version"`
}

type StorerMongoDB

type StorerMongoDB struct {
	DB *mgo.Database
}

func (StorerMongoDB) CreateDB

func (s StorerMongoDB) CreateDB(c []*storerGeneric.DBConnector) error

func (StorerMongoDB) DeleteObject

func (s StorerMongoDB) DeleteObject(id string) error

func (StorerMongoDB) DeleteSubmission

func (s StorerMongoDB) DeleteSubmission(id string) error

func (StorerMongoDB) GetConfig

func (s StorerMongoDB) GetConfig(path string) (*storerGeneric.Config, error)

func (StorerMongoDB) GetObject

func (s StorerMongoDB) GetObject(id string) (*storerGeneric.Object, error)

func (StorerMongoDB) GetResult

func (s StorerMongoDB) GetResult(id string) (*storerGeneric.Result, error)

func (StorerMongoDB) GetSubmission

func (s StorerMongoDB) GetSubmission(id string) (*storerGeneric.Submission, error)

func (StorerMongoDB) GetSubmissionsByObject

func (s StorerMongoDB) GetSubmissionsByObject(sha256 string) []*Submission

func (StorerMongoDB) Initialize

func (StorerMongoDB) Setup

func (s StorerMongoDB) Setup() error

func (StorerMongoDB) StoreConfig

func (s StorerMongoDB) StoreConfig(config *storerGeneric.Config) error

func (StorerMongoDB) StoreObject

func (s StorerMongoDB) StoreObject(object *storerGeneric.Object) (bool, error)

func (StorerMongoDB) StoreResult

func (s StorerMongoDB) StoreResult(result *storerGeneric.Result) error

func (StorerMongoDB) StoreSubmission

func (s StorerMongoDB) StoreSubmission(submission *storerGeneric.Submission) error

func (StorerMongoDB) UpdateObject

func (s StorerMongoDB) UpdateObject(id string) error

type Submission

type Submission struct {
	Id      bson.ObjectId `json:"_id" bson:"_id,omitempty"`
	SHA256  string        `json:"sha256"`
	UserId  string        `json:"user_id"`
	Source  string        `json:"source"`
	Date    string        `json:"date"`
	ObjName string        `json:"obj_name"`
	Tags    []string      `json:"tags"`
	Comment string        `json:"comment"`
}

wrapper for generic collections to use native bson _id

Jump to

Keyboard shortcuts

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