Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConnector ¶
type Result ¶
type Result struct { Id string `json:"id"` 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 string `json:"results"` Tags []string `json:"tags"` StartedDateTime time.Time `json:"started_date_time"` FinishedDateTime time.Time `json:"finished_date_time"` WatchguardStatus string `json:"watchguard_status"` WatchguardLog []string `json:"watchguard_log"` WatchguardVersion string `json:"watchguard_version"` }
type Storer ¶
type Storer interface { // Cretes the database. this is separate from Initialize() // because Initialize() requires the database to exist CreateDB(c []*DBConnector) error // Initializes the connection and the Storer object // ip, port, user, passwort, db name Initialize([]*DBConnector) (Storer, error) // Is called to setup the db on the very first run // to create initial collections (if necessary) Setup() error // The object is only inserted if it wasn't there before. // The returned bool is true, if it was previously unknown. StoreObject(*Object) (bool, error) DeleteObject(string) error GetObject(string) (*Object, error) // Gather all the submissions for the object, extract the filenames // and the sources and store them in the object UpdateObject(string) error StoreSubmission(*Submission) error DeleteSubmission(string) error GetSubmission(string) (*Submission, error) // Stores a result in the database // (TODO: return generated Id) StoreResult(*Result) error // Gets a result by Id from the database GetResult(string) (*Result, error) StoreConfig(*Config) error GetConfig(string) (*Config, error) }
Click to show internal directories.
Click to hide internal directories.