Skip to content

Commit

Permalink
Merge pull request #128 from BenB196/staging
Browse files Browse the repository at this point in the history
Added missing fields
  • Loading branch information
BenB196 authored Feb 7, 2021
2 parents 8e35fb3 + eab24f7 commit db22478
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.3
0.5.4
28 changes: 15 additions & 13 deletions eventOutput/fileHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,21 @@ type Code42Event struct {
}

type Code42File struct {
Path string `json:"path,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Category string `json:"category,omitempty"`
MimeTypeByBytes string `json:"mime_type_by_bytes,omitempty"`
MimeTypeByExtension string `json:"mime_type_by_extension,omitempty"`
Size *int64 `json:"size,omitempty"`
Owner string `json:"owner,omitempty"`
Hash *Hash `json:"hash,omitempty"`
CreateTimestamp *time.Time `json:"create_timestamp,omitempty"`
ModifyTimestamp *time.Time `json:"modify_timestamp,omitempty"`
Id string `json:"id,omitempty"`
MimeTypeMismatch *bool `json:"mime_type_mismatch,omitempty"`
Path string `json:"path,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Category string `json:"category,omitempty"`
MimeTypeByBytes string `json:"mime_type_by_bytes,omitempty"`
MimeTypeByExtension string `json:"mime_type_by_extension,omitempty"`
Size *int64 `json:"size,omitempty"`
Owner string `json:"owner,omitempty"`
Hash *Hash `json:"hash,omitempty"`
CreateTimestamp *time.Time `json:"create_timestamp,omitempty"`
ModifyTimestamp *time.Time `json:"modify_timestamp,omitempty"`
Id string `json:"id,omitempty"`
MimeTypeMismatch *bool `json:"mime_type_mismatch,omitempty"`
CategoryByBytes string `json:"category_by_bytes,omitempty"`
CategoryByExtension string `json:"category_by_extension,omitempty"`
}

type Code42Device struct {
Expand Down
5 changes: 3 additions & 2 deletions ffsEvent/ffsFetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
modifyTimestamp = nil
}


event := &eventOutput.Event{
Action: ffsEvent.EventType,
Category: "file",
Expand Down Expand Up @@ -243,7 +242,7 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
Path: ffsEvent.FilePath,
Name: ffsEvent.FileName,
Type: fileType,
Extension: strings.Replace(filepath.Ext(ffsEvent.FileName),".","",-1),
Extension: strings.Replace(filepath.Ext(ffsEvent.FileName), ".", "", -1),
Size: ffsEvent.FileSize,
Owner: ffsEvent.FileOwner,
Hash: hash,
Expand Down Expand Up @@ -389,6 +388,8 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
ModifyTimestamp: modifyTimestamp,
Id: ffsEvent.FileId,
MimeTypeMismatch: ffsEvent.MimeTypeMismatch,
CategoryByBytes: ffsEvent.FileCategoryByBytes,
CategoryByExtension: ffsEvent.FileCategoryByExtension,
}

code42Device := &eventOutput.Code42Device{
Expand Down

0 comments on commit db22478

Please sign in to comment.