Skip to content

Commit 73f7cde

Browse files
committed
Added return control for standardised unstructured data
1 parent 7b47436 commit 73f7cde

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ toolchain go1.24.4
99

1010
require (
1111
github.com/frikky/kin-openapi v0.42.0
12-
github.com/frikky/schemaless v0.0.21
12+
github.com/frikky/schemaless v0.0.22
1313
github.com/satori/go.uuid v1.2.0
14-
github.com/shuffle/shuffle-shared v0.9.30
14+
github.com/shuffle/shuffle-shared v0.9.31
1515
github.com/spf13/cobra v1.9.1
1616
)
1717

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2
142142
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
143143
github.com/frikky/kin-openapi v0.42.0 h1:d5Z6vnuQ6RnCCPIxZaDL+TH2ODLxT8abytOt+Zh+Kd0=
144144
github.com/frikky/kin-openapi v0.42.0/go.mod h1:ev9OZAw7Bv5p0w93j91++6a1ElPzGcCofst+kmrWsj4=
145-
github.com/frikky/schemaless v0.0.21 h1:uL1KJ4p1qUXhl77bgDwUbWWfr2cJlU/w0MQ2K3Rv3y0=
146-
github.com/frikky/schemaless v0.0.21/go.mod h1:m9s+6gALXhA5ZERCrJw+jI2rRtTPNa8mkl4vav9sxnY=
145+
github.com/frikky/schemaless v0.0.22 h1:aMc7cc/lr1zpogjGWbY0j6J2f6QqyfPbbW6Y9JgTAqE=
146+
github.com/frikky/schemaless v0.0.22/go.mod h1:m9s+6gALXhA5ZERCrJw+jI2rRtTPNa8mkl4vav9sxnY=
147147
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
148148
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
149149
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
@@ -331,8 +331,8 @@ github.com/sendgrid/sendgrid-go v3.16.1+incompatible h1:zWhTmB0Y8XCDzeWIm2/BIt1G
331331
github.com/sendgrid/sendgrid-go v3.16.1+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
332332
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
333333
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
334-
github.com/shuffle/shuffle-shared v0.9.30 h1:3CYvNyD7sTxdxoZjTVrtaDqFvSWQRKAFGaga6rPGf8A=
335-
github.com/shuffle/shuffle-shared v0.9.30/go.mod h1:PhDEizuz4SmJaSmy0+yrFWwD1mXVUsy8/knKlrqF1qw=
334+
github.com/shuffle/shuffle-shared v0.9.31 h1:BMoDO4Sgz4+I12aHhc3cWHiCuAQ827XIxajPqCJ9cXA=
335+
github.com/shuffle/shuffle-shared v0.9.31/go.mod h1:vfI2QDGphZGrcwuUPQ1yI/Hgc8aseFro5+2k36irfkQ=
336336
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
337337
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
338338
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=

pkg/api.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ func handleDirectTranslation(ctx context.Context, user shuffle.User, value shuff
295295
}
296296

297297
// This isn't good but... :)
298-
authConfig := fmt.Sprintf("%s,%s,%s,%s", baseUrl, authorization, user.ActiveOrg.Id, optionalExecutionId)
298+
authConfig := fmt.Sprintf("true,%s,%s,%s,%s", baseUrl, authorization, user.ActiveOrg.Id, optionalExecutionId)
299299
if standalone {
300-
authConfig = ""
300+
authConfig = "true"
301301
}
302302

303303

@@ -335,6 +335,7 @@ func handleDirectTranslation(ctx context.Context, user shuffle.User, value shuff
335335
log.Printf("[DEBUG] Translating label %s with body:\n%s\n\n", value.Label, string(marshalledFields))
336336
}
337337

338+
338339
// Is there any way to ingest these as well?
339340
schemalessOutput, err := schemaless.Translate(ctx, value.Label, marshalledFields, authConfig)
340341
if err != nil {
@@ -370,6 +371,7 @@ func handleDirectTranslation(ctx context.Context, user shuffle.User, value shuff
370371
curOrg = fmt.Sprintf("execution:%s", newExecutionId)
371372
}
372373

374+
log.Printf("\n\n\nSINGUL UPLOAD (2)\n\n\n")
373375
autoUploadSingulOutput(
374376
ctx,
375377
curOrg,
@@ -487,7 +489,6 @@ func autoUploadSingulOutput(ctx context.Context, orgId string, curApikey string,
487489
break
488490
} else {
489491
foundIdentifier = fmt.Sprintf("%x", md5.Sum(marshalledItem))
490-
log.Printf("MARSHALLED OCSF (%s):\n%s\n", foundIdentifier, string(marshalledItem))
491492
}
492493
}
493494

@@ -2615,9 +2616,9 @@ func RunActionWrapper(ctx context.Context, user shuffle.User, value shuffle.Cate
26152616
}
26162617

26172618
// No shuffler.io config for standalone runs
2618-
authConfig := fmt.Sprintf("%s,%s,%s,%s", baseUrl, authorization, orgId, optionalExecutionId)
2619+
authConfig := fmt.Sprintf("false,%s,%s,%s,%s", baseUrl, authorization, orgId, optionalExecutionId)
26192620
if standalone {
2620-
authConfig = ""
2621+
authConfig = "false"
26212622
}
26222623

26232624
outputmap := make(map[string]interface{})

0 commit comments

Comments
 (0)