Skip to content

Commit

Permalink
Merge pull request #3 from BenB196/staging
Browse files Browse the repository at this point in the history
Merge fixes for issues #1 and #2
  • Loading branch information
BenB196 authored Sep 13, 2019
2 parents 90d5150 + d4fd65a commit b2d3de1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,26 @@ FileEvent
EventType string
EventTimestamp time.Time (potentially empty)
InsertionTimestamp time.Time (potentially empty)
FilePath string
FileName string
FileType string
FileCategory string
FileSize int
FileOwner string (potentially empty)
FilePath string (potentially empty)
FileName string
FileType string (potentially empty)
FileCategory string (potentially empty)
FileSize int
FileOwner []string (potentially empty)
Md5Checksum string (potentially empty)
Sha256Checksum string (potentially empty)
CreatedTimestamp time.Time (potentially empty)
ModifyTimestamp time.Time (potentially empty)
DeviceUsername string
DeviceUid string
UserUid string
OsHostname string
DomainName string
DeviceUsername string (potentially empty)
DeviceUid string (potentially empty)
UserUid string (potentially empty)
OsHostname string (potentially empty)
DomainName string (potentially empty)
PublicIpAddress string (potentially empty)
PrivateIpAddresses []string
PrivateIpAddresses []string (potentially empty)
Actor string (potentially empty)
DirectoryId []string (potentially empty)
Source string
Source string (potentially empty)
Url string (potentially empty)
Shared string (potentially empty)
SharedWith []string (potentially empty)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3
30 changes: 18 additions & 12 deletions ffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ type FileEvent struct {
EventType string `json:"eventType"`
EventTimestamp time.Time `json:"eventTimestamp,omitempty"`
InsertionTimestamp time.Time `json:"insertionTimestamp,omitempty"`
FilePath string `json:"filePath"`
FilePath string `json:"filePath,omitempty"`
FileName string `json:"fileName"`
FileType string `json:"fileType"`
FileCategory string `json:"fileCategory"`
FileType string `json:"fileType,omitempty"`
FileCategory string `json:"fileCategory,omitempty"`
FileSize int `json:"fileSize"`
FileOwner string `json:"fileOwner,omitempty"`
FileOwner []string `json:"fileOwner,omitempty"` //Array of owners
Md5Checksum string `json:"md5Checksum,omitempty"`
Sha256Checksum string `json:"sha256Checksum,omitempty"`
CreatedTimestamp time.Time `json:"createdTimestamp,omitempty"`
ModifyTimestamp time.Time `json:"modifyTimestamp,omitempty"`
DeviceUsername string `json:"deviceUsername"`
DeviceUid string `json:"deviceUid"`
UserUid string `json:"userUid"`
OsHostname string `json:"osHostname"`
DomainName string `json:"domainName"`
DeviceUsername string `json:"deviceUsername,omitempty"`
DeviceUid string `json:"deviceUid,omitempty"`
UserUid string `json:"userUid,omitempty"`
OsHostname string `json:"osHostname,omitempty"`
DomainName string `json:"domainName,omitempty"`
PublicIpAddress string `json:"publicIpAddress,omitempty"`
PrivateIpAddresses []string `json:"privateIpAddresses"` //Array of IP address strings
PrivateIpAddresses []string `json:"privateIpAddresses,omitempty"` //Array of IP address strings
Actor string `json:"actor,omitempty"`
DirectoryId []string `json:"directoryId,omitempty"` //An array of something, I am not sure
Source string `json:"source"`
Source string `json:"source,omitempty"`
Url string `json:"url,omitempty"`
Shared string `json:"shared,omitempty"`
SharedWith []string `json:"sharedWith,omitempty"` //An array of strings (Mainly Email Addresses)
Expand Down Expand Up @@ -166,7 +166,7 @@ func csvLineToFileEvent(csvLine []string) FileEvent {
fileType := csvLine[6]
fileCategory := csvLine[7]
fileSizeString := csvLine[8] //Converted to int below
fileOwner := csvLine[9]
fileOwnerString := csvLine[9] //Converted to slice below
md5Checksum := csvLine[10]
sha256Checksum := csvLine[11]
createdTimestampString := csvLine[12] //Converted to time below
Expand Down Expand Up @@ -241,6 +241,12 @@ func csvLineToFileEvent(csvLine []string) FileEvent {
}
}

//Convert fileOwnerString to string slice
var fileOwner []string
if fileOwnerString != "" {
fileOwner = strings.Fields(fileOwnerString)
}

//Convert createdTimestamp to time
var createdTimestamp time.Time
if createdTimestampString != "" {
Expand Down

0 comments on commit b2d3de1

Please sign in to comment.