Skip to content

Commit

Permalink
Merge pull request #125 from BenB196/staging
Browse files Browse the repository at this point in the history
Removed no longer needed fields
  • Loading branch information
BenB196 authored Feb 6, 2021
2 parents 5e3b350 + 6f66d99 commit 49828cc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.5.1
12 changes: 7 additions & 5 deletions eventOutput/fileHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Code42 struct {
Source string `json:"source,omitempty"`
Url *URL `json:"url,omitempty"`
Shared string `json:"shared,omitempty"`
SharedWith []ffs.SharedWith `json:"shared_with,omitempty"`
SharedWith []Code42SharedWith `json:"shared_with,omitempty"`
SharingTypeAdded []string `json:"sharing_type_added,omitempty"`
CloudDriveId string `json:"cloud_drive_id,omitempty"`
DetectionSourceAlias string `json:"detection_source_alias,omitempty"`
Expand All @@ -58,6 +58,10 @@ type Code42TabTab struct {
Url *URL `json:"url,omitempty"`
}

type Code42SharedWith struct {
CloudUsername *string `json:"cloud_username,omitempty"`
}

type Code42Event struct {
Id string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Expand All @@ -77,8 +81,6 @@ type Code42File struct {
CreateTimestamp *time.Time `json:"create_timestamp,omitempty"`
ModifyTimestamp *time.Time `json:"modify_timestamp,omitempty"`
Id string `json:"id,omitempty"`
IdentifiedExtensionMIMEType string `json:"identified_extension_mime_type,omitempty"`
CurrentExtensionMIMEType string `json:"current_extension_mime_type,omitempty"`
MimeTypeMismatch *bool `json:"mime_type_mismatch,omitempty"`
}

Expand All @@ -88,8 +90,8 @@ type Code42Device struct {
}

type Code42Tab struct {
WindowTitle string `json:"window_title,omitempty"`
Url *URL `json:"url,omitempty"`
WindowTitle string `json:"window_title,omitempty"`
Url *URL `json:"url,omitempty"`
}

type Code42RemovableMedia struct {
Expand Down
12 changes: 11 additions & 1 deletion ffsEvent/ffsFetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,16 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
tabs = nil
}

var sharedWith []eventOutput.Code42SharedWith

if ffsEvent.SharedWith != nil && len(ffsEvent.SharedWith) != 0 {
for _, shared := range ffsEvent.SharedWith {
sharedWith = append(sharedWith, eventOutput.Code42SharedWith{CloudUsername: shared.CloudUsername})
}
} else {
sharedWith = nil
}

code42 := &eventOutput.Code42{
Event: code42Event,
InsertionTimestamp: &insertionTimestamp,
Expand All @@ -410,7 +420,7 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
Source: ffsEvent.Source,
Url: getUrlInfo(ffsEvent.Url),
Shared: ffsEvent.Shared,
SharedWith: ffsEvent.SharedWith,
SharedWith: sharedWith,
SharingTypeAdded: ffsEvent.SharingTypeAdded,
CloudDriveId: ffsEvent.CloudDriveId,
DetectionSourceAlias: ffsEvent.DetectionSourceAlias,
Expand Down

0 comments on commit 49828cc

Please sign in to comment.