Documentation ¶
Index ¶
- type Result
- type StorerMongoDB
- func (s StorerMongoDB) CreateDB(c []*storerGeneric.DBConnector) error
- func (s StorerMongoDB) DeleteObject(id string) error
- func (s StorerMongoDB) DeleteSubmission(id string) error
- func (s StorerMongoDB) GetConfig(path string) (*storerGeneric.Config, error)
- func (s StorerMongoDB) GetObject(id string) (*storerGeneric.Object, error)
- func (s StorerMongoDB) GetResult(id string) (*storerGeneric.Result, error)
- func (s StorerMongoDB) GetSubmission(id string) (*storerGeneric.Submission, error)
- func (s StorerMongoDB) GetSubmissionsByObject(sha256 string) []*Submission
- func (s StorerMongoDB) Initialize(c []*storerGeneric.DBConnector) (storerGeneric.Storer, error)
- func (s StorerMongoDB) Setup() error
- func (s StorerMongoDB) StoreConfig(config *storerGeneric.Config) error
- func (s StorerMongoDB) StoreObject(object *storerGeneric.Object) (bool, error)
- func (s StorerMongoDB) StoreResult(result *storerGeneric.Result) error
- func (s StorerMongoDB) StoreSubmission(submission *storerGeneric.Submission) error
- func (s StorerMongoDB) UpdateObject(id string) error
- type Submission
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 (s StorerMongoDB) Initialize(c []*storerGeneric.DBConnector) (storerGeneric.Storer, error)
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
Click to show internal directories.
Click to hide internal directories.