Skip to content

Commit

Permalink
Merge pull request #79 from BenB196/staging
Browse files Browse the repository at this point in the history
Merge staging to master
  • Loading branch information
BenB196 authored Dec 11, 2019
2 parents adbf2f1 + 10f86df commit 59d253f
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.2.2
4 changes: 2 additions & 2 deletions eventOutput/fileHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type SemiElasticFileEvent struct {
RemovableMediaVolumeName string `json:"removable_media_volume_name,omitempty"`
RemovableMediaPartitionId string `json:"removable_media_partition_id,omitempty"`
SyncDestination string `json:"sync_destination,omitempty"`
EmailDLPPolicyName string `json:"email_dlp_policy_name,omitempty"`
EmailDLPPolicyNames []string `json:"email_dlp_policy_names,omitempty"`
EmailDLPSubject string `json:"email_dlp_subject,omitempty"`
EmailDLPSender string `json:"email_dlp_sender,omitempty"`
EmailDLPFrom string `json:"email_dlp_from,omitempty"`
Expand Down Expand Up @@ -161,7 +161,7 @@ type RemovableMedia struct {
}

type Email struct {
DLPPolicyName string `json:"dlp_policy_name,omitempty"`
DLPPolicyNames []string `json:"dlp_policy_names,omitempty"`
DLPSubject string `json:"dlp_subject,omitempty"`
DLPSender string `json:"dlp_sender,omitempty"`
DLPFrom string `json:"dlp_from,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions ffsEvent/ffsEvent.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
if err != nil {
log.Println("error getting file events for ffs query: " + query.Name)
//check if recoverable errors are thrown
if strings.Contains(err.Error(),"Error with gathering file events POST: 500 Internal Server Error") || (strings.Contains(err.Error(),"stream error: stream ID") && (strings.Contains(err.Error(),"INTERNAL_ERROR") || strings.Contains(err.Error(),"PROTOCOL_ERROR"))) || strings.Contains(err.Error(),"read: connection reset by peer") || strings.Contains(err.Error(),"POST: 400 Bad Request") || strings.Contains(err.Error(),"unexpected EOF") || strings.Contains(err.Error(),"POST: 504 Gateway Timeout") || (strings.Contains(err.Error(),"record on line ") && strings.Contains(err.Error(),": wrong number of fields")) {
if strings.Contains(err.Error(),"Error with gathering file events POST: 500 Internal Server Error") || (strings.Contains(err.Error(),"stream error: stream ID") && (strings.Contains(err.Error(),"INTERNAL_ERROR") || strings.Contains(err.Error(),"PROTOCOL_ERROR"))) || strings.Contains(err.Error(),"read: connection reset by peer") || strings.Contains(err.Error(),"POST: 400 Bad Request") || strings.Contains(err.Error(),"unexpected EOF") || strings.Contains(err.Error(),"POST: 504 Gateway Timeout") || (strings.Contains(err.Error(),"record on line ") && strings.Contains(err.Error(),": wrong number of fields") || (strings.Contains(err.Error(),"record on line") && strings.Contains(err.Error(),"; parse error on line") && strings.Contains(err.Error(),", column") && strings.Contains(err.Error(),": extraneous or missing \" in quoted-field"))) {
//allow for 10 retries before killing to save resource overload.
log.Println("Attempting to recover from error: " + err.Error() + ". Retry number: " + strconv.Itoa(retryCount))
if retryCount <= 10 {
Expand Down Expand Up @@ -397,7 +397,7 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
}

email := eventOutput.Email{
DLPPolicyName: ffsEvent.EmailDLPPolicyName,
DLPPolicyNames: ffsEvent.EmailDLPPolicyNames,
DLPSubject: ffsEvent.EmailDLPSubject,
DLPSender: ffsEvent.EmailDLPSender,
DLPFrom: ffsEvent.EmailDLPSender,
Expand Down Expand Up @@ -551,7 +551,7 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
RemovableMediaVolumeName: ffsEvent.RemovableMediaVolumeName,
RemovableMediaPartitionId: ffsEvent.RemovableMediaPartitionId,
SyncDestination: ffsEvent.SyncDestination,
EmailDLPPolicyName: ffsEvent.EmailDLPPolicyName,
EmailDLPPolicyNames: ffsEvent.EmailDLPPolicyNames,
EmailDLPSubject: ffsEvent.EmailDLPSubject,
EmailDLPSender: ffsEvent.EmailDLPSender,
EmailDLPFrom: ffsEvent.EmailDLPSender,
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/BenB196/crashplan-ffs-puller

go 1.12
go 1.13.5

require (
github.com/BenB196/crashplan-ffs-go-pkg v0.1.0
github.com/BenB196/crashplan-ffs-go-pkg v0.1.1
github.com/BenB196/ip-api-go-pkg v0.0.7
github.com/google/go-cmp v0.3.1
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ github.com/BenB196/crashplan-ffs-go-pkg v0.0.9 h1:PixXoS8huwmsnfF1pRWqUufjeRDJx0
github.com/BenB196/crashplan-ffs-go-pkg v0.0.9/go.mod h1:oBwZ5/KfaNokjvI2Hn2e6c5801ir11FOCq4lG5PcniE=
github.com/BenB196/crashplan-ffs-go-pkg v0.1.0 h1:Mlj+WrZHGBpyq8ArXUeP50rRSEgNZ3QRWQKLcja7CCM=
github.com/BenB196/crashplan-ffs-go-pkg v0.1.0/go.mod h1:oBwZ5/KfaNokjvI2Hn2e6c5801ir11FOCq4lG5PcniE=
github.com/BenB196/crashplan-ffs-go-pkg v0.1.1 h1:uUbPTPLoROfGd1B03NUsPdlquR8qN4M1C+IlCug5Wec=
github.com/BenB196/crashplan-ffs-go-pkg v0.1.1/go.mod h1:oBwZ5/KfaNokjvI2Hn2e6c5801ir11FOCq4lG5PcniE=
github.com/BenB196/ip-api-go-pkg v0.0.3 h1:FWmM7FkhT1N55jd4jPW7W9LVOQrG89DLlrgwMb5fosw=
github.com/BenB196/ip-api-go-pkg v0.0.3/go.mod h1:ccPdkBNnzf/uvuk7qXgEO06TCS/qILNJQP/KETQG4jU=
github.com/BenB196/ip-api-go-pkg v0.0.4 h1:BbWELxooG6l2gaXQ4i4gm6NsyikdbhalF+TKg08gDPQ=
Expand Down
10 changes: 5 additions & 5 deletions vendor/github.com/BenB196/crashplan-ffs-go-pkg/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/BenB196/crashplan-ffs-go-pkg/VERSION

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions vendor/github.com/BenB196/crashplan-ffs-go-pkg/ffs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# github.com/BenB196/crashplan-ffs-go-pkg v0.1.0
# github.com/BenB196/crashplan-ffs-go-pkg v0.1.1
github.com/BenB196/crashplan-ffs-go-pkg
# github.com/BenB196/ip-api-go-pkg v0.0.7
github.com/BenB196/ip-api-go-pkg
Expand Down

0 comments on commit 59d253f

Please sign in to comment.