refactor: Update ARR body parsing logic
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ Thumbs.db
|
|||||||
|
|
||||||
# Go specific
|
# Go specific
|
||||||
# go.sum
|
# go.sum
|
||||||
go.mod
|
# go.mod
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
*.test
|
*.test
|
||||||
|
|||||||
+113
@@ -0,0 +1,113 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
vars:
|
||||||
|
APP_NAME: tele-proc
|
||||||
|
GO_FILES:
|
||||||
|
sh: find . -name '*.go' -type f
|
||||||
|
CONFIG_DIR: configs
|
||||||
|
BUILD_DIR: build
|
||||||
|
MAIN_RECEIVER: ./cmd/main/main.go
|
||||||
|
HASURA_ENDPOINT: http://localhost:8080/v1/graphql
|
||||||
|
SCHEMA_FILE: ./internal/repository/schema.graphql
|
||||||
|
HASURA_SECRET: # Set your Hasura admin secret here
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
all:
|
||||||
|
desc: Default target
|
||||||
|
cmds:
|
||||||
|
- task: build
|
||||||
|
|
||||||
|
build:
|
||||||
|
desc: Build the receiver application
|
||||||
|
cmds:
|
||||||
|
- task: build-receiver
|
||||||
|
|
||||||
|
build-receiver:
|
||||||
|
desc: Build the receiver application
|
||||||
|
cmds:
|
||||||
|
- echo "Building receiver..."
|
||||||
|
- go build -o {{.BUILD_DIR}}/receiver {{.MAIN_RECEIVER}}
|
||||||
|
|
||||||
|
run:
|
||||||
|
desc: Run the receiver application with different configurations
|
||||||
|
cmds:
|
||||||
|
- task: run-dev
|
||||||
|
|
||||||
|
run-dev:
|
||||||
|
desc: Run the receiver in development mode
|
||||||
|
cmds:
|
||||||
|
- echo "Running receiver in development mode..."
|
||||||
|
- GO_ENV=development {{.BUILD_DIR}}/receiver &
|
||||||
|
|
||||||
|
run-prod:
|
||||||
|
desc: Run the receiver in production mode
|
||||||
|
cmds:
|
||||||
|
- echo "Running receiver in production mode..."
|
||||||
|
- GO_ENV=production {{.BUILD_DIR}}/receiver &
|
||||||
|
|
||||||
|
run-test:
|
||||||
|
desc: Run the receiver in test mode
|
||||||
|
cmds:
|
||||||
|
- echo "Running receiver in test mode..."
|
||||||
|
- GO_ENV=test {{.BUILD_DIR}}/receiver &
|
||||||
|
|
||||||
|
test:
|
||||||
|
desc: Test the application
|
||||||
|
cmds:
|
||||||
|
- echo "Running tests..."
|
||||||
|
- ginkgo -r -v
|
||||||
|
|
||||||
|
clean:
|
||||||
|
desc: Clean build artifacts
|
||||||
|
cmds:
|
||||||
|
- echo "Cleaning build artifacts..."
|
||||||
|
- rm -rf {{.BUILD_DIR}}
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
desc: Format the code
|
||||||
|
cmds:
|
||||||
|
- echo "Formatting code..."
|
||||||
|
- go fmt ./...
|
||||||
|
|
||||||
|
deps:
|
||||||
|
desc: Install dependencies
|
||||||
|
cmds:
|
||||||
|
- echo "Installing dependencies..."
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
lint:
|
||||||
|
desc: Lint the code
|
||||||
|
cmds:
|
||||||
|
- echo "Linting code..."
|
||||||
|
- golangci-lint run
|
||||||
|
|
||||||
|
schema:
|
||||||
|
desc: Download the GraphQL schema from Hasura server
|
||||||
|
cmds:
|
||||||
|
- echo "Downloading GraphQL schema..."
|
||||||
|
- >
|
||||||
|
gq {{.HASURA_ENDPOINT}} -H 'X-Hasura-Admin-Secret: {{.HASURA_SECRET}}' --introspect > {{.SCHEMA_FILE}}
|
||||||
|
|
||||||
|
|
||||||
|
gen:
|
||||||
|
desc: Generate code using genqlient
|
||||||
|
cmds:
|
||||||
|
- echo "Generating code using genqlient..."
|
||||||
|
- cd internal/repository && go run github.com/Khan/genqlient && cd ../..
|
||||||
|
|
||||||
|
help:
|
||||||
|
desc: Show this help message
|
||||||
|
cmds:
|
||||||
|
- echo "Taskfile usage:"
|
||||||
|
- echo " task build - Build the application"
|
||||||
|
- echo " task run - Run the receiver in development mode"
|
||||||
|
- echo " task run-dev - Run the receiver in development mode"
|
||||||
|
- echo " task run-prod - Run the receiver in production mode"
|
||||||
|
- echo " task run-test - Run the receiver in test mode"
|
||||||
|
- echo " task test - Run tests"
|
||||||
|
- echo " task clean - Clean build artifacts"
|
||||||
|
- echo " task fmt - Format the code"
|
||||||
|
- echo " task deps - Install dependencies"
|
||||||
|
- echo " task lint - Lint the code"
|
||||||
|
- echo " task download-schema - Download the GraphQL schema from Hasura server"
|
||||||
|
- echo " task help - Show this help message"
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
[nats]
|
||||||
|
url = "nats://localhost:4222"
|
||||||
|
cluster_id = "test-cluster"
|
||||||
|
client_id = "test-client"
|
||||||
|
|
||||||
|
[subscription]
|
||||||
|
topic = "example-topic"
|
||||||
|
queue_group = "example-group"
|
||||||
|
|
||||||
|
[timeouts]
|
||||||
|
server_timeout = "30s"
|
||||||
|
reconnect_wait = "10s"
|
||||||
|
close_timeout = "10s"
|
||||||
|
ack_wait_timeout = "5s"
|
||||||
|
|
||||||
|
[[body]]
|
||||||
|
name = "FPL"
|
||||||
|
[[body.patterns]]
|
||||||
|
pattern = "^\\((?P<type>[A-Z]{3})\\-(?P<number>[A-Z]+\\d+)\\-(?P<indicator>[A-Z]{2})(?:.*\\s*)?\\-(?P<aircraft>[A-Z]+\\d+/?[A-Z]?)\\s*\\-(?P<surve>.*)\\s*\\-(?P<departure>[A-Z]{4})(?P<departure_time>\\d{4})\\s*\\-(?P<speed>[A-Z]+\\d+)(?P<level>[A-Z0-9]+)\\s(?P<route>.*)\\s*\\-(?P<destination>[A-Z]{4})(?P<estt>\\d{4})\\s(?P<alter>[A-Z]{4})\\s*\\-(?P<pbn>PBN\\/[A-Z0-9]+)\\s(?P<nav>NAV\\/\\w+)\\sREG\\/(?P<reg>[A-Z0-9]+)\\sEET\\/(?P<eet>\\w{4}\\d{4})\\sSEL\\/(?P<sel>\\w+)\\sPER\\/(?P<performance>\\w)\\sRIF\\/(?P<rif>\\w+\\s[A-Z0-9]+\\s[A-Z]+)\\s*RMK\\/(?P<remark>.*)\\)$"
|
||||||
|
comments = "FPL multi line expression"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [[body]]
|
||||||
|
# name = "ARR"
|
||||||
|
# patterns = [
|
||||||
|
# {
|
||||||
|
# pattern = '^\((?P<type>[A-Z]{3})\-(?P<number>[A-Z]+\d+)\-(?P<indicator>[A-Z]{2})(?:.*\s*)?\-(?P<aircraft>[A-Z]+\d+/?[A-Z]?)\s*\-(?P<surve>.*)\s*\-(?P<departure>[A-Z]{4})(?P<departure_time>\d{4})\s*\-(?P<speed>[A-Z]+\d+)(?P<level>[A-Z0-9]+)\s(?P<route>.*)\s*\-(?P<destination>[A-Z]{4})(?P<estt>\d{4})\s(?P<alter>[A-Z]{4})\s*\-(?P<pbn>PBN\/[A-Z0-9]+)\s(?P<nav>NAV\/\w+)\sREG\/(?P<reg>[A-Z0-9]+)\sEET\/(?P<eet>\w{4}\d{4})\sSEL\/(?P<sel>\w+)\sPER\/(?P<performance>\w)\sRIF\/(?P<rif>\w+\s[A-Z0-9]+\s[A-Z]+)\s*RMK\/(?P<remark>.*)\)$',
|
||||||
|
# comments = "one line arrival expression"
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
|
||||||
|
# [[body]]
|
||||||
|
# name = "DEP"
|
||||||
|
# patterns = [
|
||||||
|
# {
|
||||||
|
# pattern = '^\((?P<type>[A-Z]{3})\-(?P<number>([A-Z]+\d+))\/?(?P<ssr>[A-Z]+\d+)\-(?P<departure>[A-Z]{4})(?P<departure_time>\d{4})\-(?P<destination>[A-Z]{4})(?P<destination_time>\d{4})?\-?(?P<alter>[A-Z]{4})?\-?(?P<other>.*)?\)$',
|
||||||
|
# comments = "one line departure expression"
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Default genqlient config; for full documentation see:
|
||||||
|
# https://github.com/Khan/genqlient/blob/main/docs/genqlient.yaml
|
||||||
|
schema: schema.graphql
|
||||||
|
operations:
|
||||||
|
- genqlient.graphql
|
||||||
|
generated: generated.go
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
module caatsm
|
||||||
|
|
||||||
|
go 1.22.5
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/ThreeDotsLabs/watermill v1.3.5
|
||||||
|
github.com/ThreeDotsLabs/watermill-nats/v2 v2.0.2
|
||||||
|
github.com/hasura/go-graphql-client v0.12.2
|
||||||
|
github.com/nats-io/nats.go v1.34.0
|
||||||
|
github.com/onsi/ginkgo/v2 v2.19.0
|
||||||
|
github.com/onsi/gomega v1.33.1
|
||||||
|
github.com/spf13/viper v1.19.0
|
||||||
|
go.uber.org/zap v1.21.0
|
||||||
|
golang.org/x/oauth2 v0.18.0
|
||||||
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/Khan/genqlient v0.7.0 // indirect
|
||||||
|
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||||
|
github.com/alexflint/go-arg v1.4.2 // indirect
|
||||||
|
github.com/alexflint/go-scalar v1.0.0 // indirect
|
||||||
|
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||||
|
github.com/go-logr/logr v1.4.1 // indirect
|
||||||
|
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
|
||||||
|
github.com/golang/protobuf v1.5.3 // indirect
|
||||||
|
github.com/google/go-cmp v0.6.0 // indirect
|
||||||
|
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
|
||||||
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
|
github.com/klauspost/compress v1.17.2 // indirect
|
||||||
|
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
|
||||||
|
github.com/magiconair/properties v1.8.7 // indirect
|
||||||
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
|
github.com/nats-io/nkeys v0.4.7 // indirect
|
||||||
|
github.com/nats-io/nuid v1.0.1 // indirect
|
||||||
|
github.com/oklog/ulid v1.3.1 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||||
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
|
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
||||||
|
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||||
|
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||||
|
github.com/spf13/afero v1.11.0 // indirect
|
||||||
|
github.com/spf13/cast v1.6.0 // indirect
|
||||||
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
|
github.com/subosito/gotenv v1.6.0 // indirect
|
||||||
|
github.com/vektah/gqlparser/v2 v2.5.11 // indirect
|
||||||
|
go.uber.org/atomic v1.9.0 // indirect
|
||||||
|
go.uber.org/multierr v1.9.0 // indirect
|
||||||
|
golang.org/x/crypto v0.23.0 // indirect
|
||||||
|
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
|
||||||
|
golang.org/x/mod v0.17.0 // indirect
|
||||||
|
golang.org/x/net v0.25.0 // indirect
|
||||||
|
golang.org/x/sync v0.7.0 // indirect
|
||||||
|
golang.org/x/sys v0.20.0 // indirect
|
||||||
|
golang.org/x/text v0.15.0 // indirect
|
||||||
|
golang.org/x/tools v0.21.0 // indirect
|
||||||
|
google.golang.org/appengine v1.6.8 // indirect
|
||||||
|
google.golang.org/protobuf v1.33.0 // indirect
|
||||||
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
nhooyr.io/websocket v1.8.11 // indirect
|
||||||
|
)
|
||||||
@@ -1,11 +1,23 @@
|
|||||||
|
github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w=
|
||||||
|
github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM=
|
||||||
github.com/ThreeDotsLabs/watermill v1.3.5 h1:50JEPEhMGZQMh08ct0tfO1PsgMOAOhV3zxK2WofkbXg=
|
github.com/ThreeDotsLabs/watermill v1.3.5 h1:50JEPEhMGZQMh08ct0tfO1PsgMOAOhV3zxK2WofkbXg=
|
||||||
github.com/ThreeDotsLabs/watermill v1.3.5/go.mod h1:O/u/Ptyrk5MPTxSeWM5vzTtZcZfxXfO9PK9eXTYiFZY=
|
github.com/ThreeDotsLabs/watermill v1.3.5/go.mod h1:O/u/Ptyrk5MPTxSeWM5vzTtZcZfxXfO9PK9eXTYiFZY=
|
||||||
github.com/ThreeDotsLabs/watermill-nats/v2 v2.0.2 h1:/87LcdSzUEdCKbJptaLE987hOVOs852b+v5pukegggo=
|
github.com/ThreeDotsLabs/watermill-nats/v2 v2.0.2 h1:/87LcdSzUEdCKbJptaLE987hOVOs852b+v5pukegggo=
|
||||||
github.com/ThreeDotsLabs/watermill-nats/v2 v2.0.2/go.mod h1:uslCjpuzANBzawXYlwx2IDyGjpv9M42U2TQH6JMMQis=
|
github.com/ThreeDotsLabs/watermill-nats/v2 v2.0.2/go.mod h1:uslCjpuzANBzawXYlwx2IDyGjpv9M42U2TQH6JMMQis=
|
||||||
|
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
|
||||||
|
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
|
||||||
|
github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0=
|
||||||
|
github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM=
|
||||||
|
github.com/alexflint/go-scalar v1.0.0 h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70=
|
||||||
|
github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw=
|
||||||
|
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
|
||||||
|
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||||
|
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
|
||||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||||
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||||
@@ -14,6 +26,11 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
|||||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||||
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
|
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
|
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||||
|
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg=
|
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg=
|
||||||
@@ -31,8 +48,11 @@ github.com/hasura/go-graphql-client v0.12.2 h1:cYeQK/CELtvFy2jvik4kG0b5UMGngQRYW
|
|||||||
github.com/hasura/go-graphql-client v0.12.2/go.mod h1:17qYcHgGSensF/wMAHKUhtMYaRZwZa3TyD7biqH9L3k=
|
github.com/hasura/go-graphql-client v0.12.2/go.mod h1:17qYcHgGSensF/wMAHKUhtMYaRZwZa3TyD7biqH9L3k=
|
||||||
github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4=
|
github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4=
|
||||||
github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
||||||
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||||
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
github.com/lithammer/shortuuid/v3 v3.0.7 h1:trX0KTHy4Pbwo/6ia8fscyHoGA+mf1jWbPJVuvyJQQ8=
|
github.com/lithammer/shortuuid/v3 v3.0.7 h1:trX0KTHy4Pbwo/6ia8fscyHoGA+mf1jWbPJVuvyJQQ8=
|
||||||
@@ -41,8 +61,8 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V
|
|||||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU=
|
github.com/nats-io/nats.go v1.34.0 h1:fnxnPCNiwIG5w08rlMcEKTUw4AV/nKyGCOJE8TdhSPk=
|
||||||
github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
github.com/nats-io/nats.go v1.34.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
||||||
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
|
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
|
||||||
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
|
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
|
||||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||||
@@ -55,6 +75,7 @@ github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
|
|||||||
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
||||||
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
@@ -80,6 +101,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
|||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||||
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
@@ -87,36 +111,96 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
|
|||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
|
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
|
||||||
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8=
|
||||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc=
|
||||||
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
||||||
|
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
|
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
|
||||||
|
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||||
|
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||||
|
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
|
||||||
|
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
|
||||||
|
go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
|
||||||
|
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
|
||||||
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
|
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
|
||||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
|
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
|
||||||
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
|
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||||
|
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
||||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||||
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
|
golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=
|
||||||
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=
|
||||||
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||||
|
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
||||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=
|
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=
|
||||||
golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||||
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||||
|
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||||
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
|
||||||
|
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||||
|
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0=
|
nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0=
|
||||||
|
|||||||
@@ -0,0 +1,163 @@
|
|||||||
|
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
|
||||||
|
|
||||||
|
package repository
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/Khan/genqlient/graphql"
|
||||||
|
"github.com/google/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
// input type for inserting data into table "aviation.telegrams"
|
||||||
|
type Aviation_telegrams_insert_input struct {
|
||||||
|
Body_and_footer string `json:"body_and_footer"`
|
||||||
|
Body_data json.RawMessage `json:"body_data"`
|
||||||
|
Category string `json:"category"`
|
||||||
|
Date_time string `json:"date_time"`
|
||||||
|
Dispatched_at time.Time `json:"dispatched_at"`
|
||||||
|
Id int `json:"id"`
|
||||||
|
Message_id string `json:"message_id"`
|
||||||
|
Need_dispatch bool `json:"need_dispatch"`
|
||||||
|
Originator string `json:"originator"`
|
||||||
|
Originator_date_time string `json:"originator_date_time"`
|
||||||
|
Parsed_at time.Time `json:"parsed_at"`
|
||||||
|
Primary_address string `json:"primary_address"`
|
||||||
|
Priority_indicator string `json:"priority_indicator"`
|
||||||
|
Received_at time.Time `json:"received_at"`
|
||||||
|
Secondary_addresses json.RawMessage `json:"secondary_addresses"`
|
||||||
|
Uuid uuid.UUID `json:"uuid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBody_and_footer returns Aviation_telegrams_insert_input.Body_and_footer, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetBody_and_footer() string { return v.Body_and_footer }
|
||||||
|
|
||||||
|
// GetBody_data returns Aviation_telegrams_insert_input.Body_data, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetBody_data() json.RawMessage { return v.Body_data }
|
||||||
|
|
||||||
|
// GetCategory returns Aviation_telegrams_insert_input.Category, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetCategory() string { return v.Category }
|
||||||
|
|
||||||
|
// GetDate_time returns Aviation_telegrams_insert_input.Date_time, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetDate_time() string { return v.Date_time }
|
||||||
|
|
||||||
|
// GetDispatched_at returns Aviation_telegrams_insert_input.Dispatched_at, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetDispatched_at() time.Time { return v.Dispatched_at }
|
||||||
|
|
||||||
|
// GetId returns Aviation_telegrams_insert_input.Id, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetId() int { return v.Id }
|
||||||
|
|
||||||
|
// GetMessage_id returns Aviation_telegrams_insert_input.Message_id, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetMessage_id() string { return v.Message_id }
|
||||||
|
|
||||||
|
// GetNeed_dispatch returns Aviation_telegrams_insert_input.Need_dispatch, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetNeed_dispatch() bool { return v.Need_dispatch }
|
||||||
|
|
||||||
|
// GetOriginator returns Aviation_telegrams_insert_input.Originator, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetOriginator() string { return v.Originator }
|
||||||
|
|
||||||
|
// GetOriginator_date_time returns Aviation_telegrams_insert_input.Originator_date_time, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetOriginator_date_time() string {
|
||||||
|
return v.Originator_date_time
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetParsed_at returns Aviation_telegrams_insert_input.Parsed_at, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetParsed_at() time.Time { return v.Parsed_at }
|
||||||
|
|
||||||
|
// GetPrimary_address returns Aviation_telegrams_insert_input.Primary_address, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetPrimary_address() string { return v.Primary_address }
|
||||||
|
|
||||||
|
// GetPriority_indicator returns Aviation_telegrams_insert_input.Priority_indicator, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetPriority_indicator() string { return v.Priority_indicator }
|
||||||
|
|
||||||
|
// GetReceived_at returns Aviation_telegrams_insert_input.Received_at, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetReceived_at() time.Time { return v.Received_at }
|
||||||
|
|
||||||
|
// GetSecondary_addresses returns Aviation_telegrams_insert_input.Secondary_addresses, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetSecondary_addresses() json.RawMessage {
|
||||||
|
return v.Secondary_addresses
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUuid returns Aviation_telegrams_insert_input.Uuid, and is useful for accessing the field via an interface.
|
||||||
|
func (v *Aviation_telegrams_insert_input) GetUuid() uuid.UUID { return v.Uuid }
|
||||||
|
|
||||||
|
// __newMessageInput is used internally by genqlient
|
||||||
|
type __newMessageInput struct {
|
||||||
|
Object Aviation_telegrams_insert_input `json:"object"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetObject returns __newMessageInput.Object, and is useful for accessing the field via an interface.
|
||||||
|
func (v *__newMessageInput) GetObject() Aviation_telegrams_insert_input { return v.Object }
|
||||||
|
|
||||||
|
// newMessageInsert_aviation_telegrams_oneAviation_telegrams includes the requested fields of the GraphQL type aviation_telegrams.
|
||||||
|
// The GraphQL type's documentation follows.
|
||||||
|
//
|
||||||
|
// columns and relationships of "aviation.telegrams"
|
||||||
|
type newMessageInsert_aviation_telegrams_oneAviation_telegrams struct {
|
||||||
|
Id int `json:"id"`
|
||||||
|
Message_id string `json:"message_id"`
|
||||||
|
Uuid uuid.UUID `json:"uuid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetId returns newMessageInsert_aviation_telegrams_oneAviation_telegrams.Id, and is useful for accessing the field via an interface.
|
||||||
|
func (v *newMessageInsert_aviation_telegrams_oneAviation_telegrams) GetId() int { return v.Id }
|
||||||
|
|
||||||
|
// GetMessage_id returns newMessageInsert_aviation_telegrams_oneAviation_telegrams.Message_id, and is useful for accessing the field via an interface.
|
||||||
|
func (v *newMessageInsert_aviation_telegrams_oneAviation_telegrams) GetMessage_id() string {
|
||||||
|
return v.Message_id
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUuid returns newMessageInsert_aviation_telegrams_oneAviation_telegrams.Uuid, and is useful for accessing the field via an interface.
|
||||||
|
func (v *newMessageInsert_aviation_telegrams_oneAviation_telegrams) GetUuid() uuid.UUID {
|
||||||
|
return v.Uuid
|
||||||
|
}
|
||||||
|
|
||||||
|
// newMessageResponse is returned by newMessage on success.
|
||||||
|
type newMessageResponse struct {
|
||||||
|
// insert a single row into the table: "aviation.telegrams"
|
||||||
|
Insert_aviation_telegrams_one newMessageInsert_aviation_telegrams_oneAviation_telegrams `json:"insert_aviation_telegrams_one"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetInsert_aviation_telegrams_one returns newMessageResponse.Insert_aviation_telegrams_one, and is useful for accessing the field via an interface.
|
||||||
|
func (v *newMessageResponse) GetInsert_aviation_telegrams_one() newMessageInsert_aviation_telegrams_oneAviation_telegrams {
|
||||||
|
return v.Insert_aviation_telegrams_one
|
||||||
|
}
|
||||||
|
|
||||||
|
// The query or mutation executed by newMessage.
|
||||||
|
const newMessage_Operation = `
|
||||||
|
mutation newMessage ($object: aviation_telegrams_insert_input!) {
|
||||||
|
insert_aviation_telegrams_one(object: $object) {
|
||||||
|
id
|
||||||
|
message_id
|
||||||
|
uuid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
|
func newMessage(
|
||||||
|
ctx_ context.Context,
|
||||||
|
client_ graphql.Client,
|
||||||
|
object Aviation_telegrams_insert_input,
|
||||||
|
) (*newMessageResponse, error) {
|
||||||
|
req_ := &graphql.Request{
|
||||||
|
OpName: "newMessage",
|
||||||
|
Query: newMessage_Operation,
|
||||||
|
Variables: &__newMessageInput{
|
||||||
|
Object: object,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
var err_ error
|
||||||
|
|
||||||
|
var data_ newMessageResponse
|
||||||
|
resp_ := &graphql.Response{Data: &data_}
|
||||||
|
|
||||||
|
err_ = client_.MakeRequest(
|
||||||
|
ctx_,
|
||||||
|
req_,
|
||||||
|
resp_,
|
||||||
|
)
|
||||||
|
|
||||||
|
return &data_, err_
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
mutation newMessage($object: aviation_telegrams_insert_input!) {
|
||||||
|
insert_aviation_telegrams_one(object: $object) {
|
||||||
|
id
|
||||||
|
message_id
|
||||||
|
uuid
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Default genqlient config; for full documentation see:
|
||||||
|
# https://github.com/Khan/genqlient/blob/main/docs/genqlient.yaml
|
||||||
|
schema: schema.graphql
|
||||||
|
operations:
|
||||||
|
- genqlient.graphql
|
||||||
|
generated: generated.go
|
||||||
|
bindings:
|
||||||
|
jsonb:
|
||||||
|
type: encoding/json.RawMessage
|
||||||
|
timestamp:
|
||||||
|
type: time.Time
|
||||||
|
uuid:
|
||||||
|
type: github.com/google/uuid.UUID
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"SuitePath": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository",
|
||||||
|
"SuiteDescription": "Repositories Suite",
|
||||||
|
"SuiteLabels": [],
|
||||||
|
"SuiteSucceeded": true,
|
||||||
|
"SuiteHasProgrammaticFocus": false,
|
||||||
|
"SpecialSuiteFailureReasons": null,
|
||||||
|
"PreRunStats": {
|
||||||
|
"TotalSpecs": 3,
|
||||||
|
"SpecsThatWillRun": 1
|
||||||
|
},
|
||||||
|
"StartTime": "2024-07-23T11:25:30.889407931+08:00",
|
||||||
|
"EndTime": "2024-07-23T11:25:30.892377154+08:00",
|
||||||
|
"RunTime": 2969222,
|
||||||
|
"SuiteConfig": {
|
||||||
|
"RandomSeed": 1721705130,
|
||||||
|
"RandomizeAllSpecs": false,
|
||||||
|
"FocusStrings": [
|
||||||
|
"Repositories Hasura Repository should mutate a parsed message"
|
||||||
|
],
|
||||||
|
"SkipStrings": null,
|
||||||
|
"FocusFiles": null,
|
||||||
|
"SkipFiles": null,
|
||||||
|
"LabelFilter": "",
|
||||||
|
"FailOnPending": false,
|
||||||
|
"FailOnEmpty": false,
|
||||||
|
"FailFast": false,
|
||||||
|
"FlakeAttempts": 0,
|
||||||
|
"MustPassRepeatedly": 0,
|
||||||
|
"DryRun": false,
|
||||||
|
"PollProgressAfter": 0,
|
||||||
|
"PollProgressInterval": 0,
|
||||||
|
"Timeout": 3599523895104,
|
||||||
|
"EmitSpecProgress": false,
|
||||||
|
"OutputInterceptorMode": "",
|
||||||
|
"SourceRoots": null,
|
||||||
|
"GracePeriod": 30000000000,
|
||||||
|
"ParallelProcess": 1,
|
||||||
|
"ParallelTotal": 1,
|
||||||
|
"ParallelHost": ""
|
||||||
|
},
|
||||||
|
"SpecReports": [
|
||||||
|
{
|
||||||
|
"ContainerHierarchyTexts": [
|
||||||
|
"Repositories",
|
||||||
|
"Just a simple test"
|
||||||
|
],
|
||||||
|
"ContainerHierarchyLocations": [
|
||||||
|
{
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 19
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 20
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ContainerHierarchyLabels": [
|
||||||
|
[],
|
||||||
|
[]
|
||||||
|
],
|
||||||
|
"LeafNodeType": "It",
|
||||||
|
"LeafNodeLocation": {
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 56
|
||||||
|
},
|
||||||
|
"LeafNodeLabels": [],
|
||||||
|
"LeafNodeText": "should not error",
|
||||||
|
"State": "skipped",
|
||||||
|
"StartTime": "2024-07-23T11:25:30.889468443+08:00",
|
||||||
|
"EndTime": "0001-01-01T00:00:00Z",
|
||||||
|
"RunTime": 0,
|
||||||
|
"ParallelProcess": 1,
|
||||||
|
"NumAttempts": 0,
|
||||||
|
"MaxFlakeAttempts": 0,
|
||||||
|
"MaxMustPassRepeatedly": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ContainerHierarchyTexts": [
|
||||||
|
"Repositories",
|
||||||
|
"Just a simple test"
|
||||||
|
],
|
||||||
|
"ContainerHierarchyLocations": [
|
||||||
|
{
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 19
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 20
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ContainerHierarchyLabels": [
|
||||||
|
[],
|
||||||
|
[]
|
||||||
|
],
|
||||||
|
"LeafNodeType": "It",
|
||||||
|
"LeafNodeLocation": {
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 60
|
||||||
|
},
|
||||||
|
"LeafNodeLabels": [],
|
||||||
|
"LeafNodeText": "name should be new",
|
||||||
|
"State": "skipped",
|
||||||
|
"StartTime": "2024-07-23T11:25:30.889483979+08:00",
|
||||||
|
"EndTime": "0001-01-01T00:00:00Z",
|
||||||
|
"RunTime": 0,
|
||||||
|
"ParallelProcess": 1,
|
||||||
|
"NumAttempts": 0,
|
||||||
|
"MaxFlakeAttempts": 0,
|
||||||
|
"MaxMustPassRepeatedly": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ContainerHierarchyTexts": [
|
||||||
|
"Repositories",
|
||||||
|
"Hasura Repository"
|
||||||
|
],
|
||||||
|
"ContainerHierarchyLocations": [
|
||||||
|
{
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 19
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 66
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ContainerHierarchyLabels": [
|
||||||
|
[],
|
||||||
|
[]
|
||||||
|
],
|
||||||
|
"LeafNodeType": "It",
|
||||||
|
"LeafNodeLocation": {
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 72
|
||||||
|
},
|
||||||
|
"LeafNodeLabels": [],
|
||||||
|
"LeafNodeText": "should mutate a parsed message",
|
||||||
|
"State": "passed",
|
||||||
|
"StartTime": "2024-07-23T11:25:30.889488379+08:00",
|
||||||
|
"EndTime": "2024-07-23T11:25:30.89235263+08:00",
|
||||||
|
"RunTime": 2864253,
|
||||||
|
"ParallelProcess": 1,
|
||||||
|
"NumAttempts": 1,
|
||||||
|
"MaxFlakeAttempts": 0,
|
||||||
|
"MaxMustPassRepeatedly": 0,
|
||||||
|
"SpecEvents": [
|
||||||
|
{
|
||||||
|
"SpecEventType": "Node",
|
||||||
|
"CodeLocation": {
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 72
|
||||||
|
},
|
||||||
|
"TimelineLocation": {
|
||||||
|
"Order": 1,
|
||||||
|
"Time": "2024-07-23T11:25:30.889491289+08:00"
|
||||||
|
},
|
||||||
|
"Message": "should mutate a parsed message",
|
||||||
|
"NodeType": "It"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"SpecEventType": "Node (End)",
|
||||||
|
"CodeLocation": {
|
||||||
|
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/repository/hasura_test.go",
|
||||||
|
"LineNumber": 72
|
||||||
|
},
|
||||||
|
"TimelineLocation": {
|
||||||
|
"Order": 3,
|
||||||
|
"Time": "2024-07-23T11:25:30.892349748+08:00"
|
||||||
|
},
|
||||||
|
"Message": "should mutate a parsed message",
|
||||||
|
"Duration": 2858459,
|
||||||
|
"NodeType": "It"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -2,67 +2,45 @@ package repository
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"time"
|
|
||||||
|
|
||||||
"caatsm/internal/domain"
|
"caatsm/internal/domain"
|
||||||
|
|
||||||
"github.com/hasura/go-graphql-client"
|
"github.com/Khan/genqlient/graphql"
|
||||||
|
"github.com/google/uuid"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HasuraRepository struct {
|
type HasuraRepository struct {
|
||||||
hasuraClient *graphql.Client
|
client graphql.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewHasuraClient creates a new HasuraClient
|
// NewHasuraRepo creates a new HasuraRepository
|
||||||
func NewHasuraRepo(endpoint, secret string) *HasuraRepository {
|
func NewHasuraRepo(endpoint, secret string) *HasuraRepository {
|
||||||
src := oauth2.StaticTokenSource(
|
src := oauth2.StaticTokenSource(
|
||||||
&oauth2.Token{AccessToken: os.Getenv("GRAPHQL_TOKEN")},
|
&oauth2.Token{AccessToken: os.Getenv("GRAPHQL_TOKEN")},
|
||||||
)
|
)
|
||||||
httpClient := oauth2.NewClient(context.Background(), src)
|
httpClient := oauth2.NewClient(context.Background(), src)
|
||||||
return &HasuraRepository{
|
return &HasuraRepository{
|
||||||
hasuraClient: graphql.NewClient(endpoint, httpClient),
|
client: graphql.NewClient(endpoint, httpClient),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// InsertParsedMessage inserts a new ParsedMessage into the Hasura GraphQL API
|
// InsertParsedMessage inserts a new ParsedMessage into the Hasura GraphQL API
|
||||||
func (hr *HasuraRepository) InsertParsedMessage(pm *domain.ParsedMessage) error {
|
func (hr *HasuraRepository) InsertParsedMessage(pm *domain.ParsedMessage) error {
|
||||||
if hr.hasuraClient == nil {
|
variables := Aviation_telegrams_insert_input{
|
||||||
return fmt.Errorf("hasuraClient is nil")
|
// Id: 10,
|
||||||
|
Body_and_footer: pm.BodyAndFooter,
|
||||||
|
// Body_data: pm.BodyData.(json.RawMessage),
|
||||||
|
Category: pm.Category,
|
||||||
|
Date_time: pm.DateTime,
|
||||||
|
Dispatched_at: pm.DispatchedAt,
|
||||||
|
Uuid: uuid.New(),
|
||||||
}
|
}
|
||||||
|
_, err := newMessage(context.Background(), hr.client, variables)
|
||||||
var mutation struct {
|
|
||||||
InsertParsedMessages struct {
|
|
||||||
Returning []domain.ParsedMessage `json:"returning"`
|
|
||||||
} `graphql:"insert_messages_one(object: {message_id: $messageId, date_time: $dateTime, priority_indicator: $priorityIndicator, primary_address: $primaryAddress, secondary_addresses: $secondaryAddresses, originator: $originator, originator_date_time: $originatorDateTime, category: $category, body_and_footer: $bodyAndFooter, body_data: $bodyData, received_at: $receivedAt, parsed_at: $parsedAt, need_dispatch: $needDispatch})"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define the variables with their types
|
|
||||||
variables := map[string]interface{}{
|
|
||||||
"messageId": graphql.String(pm.MessageID),
|
|
||||||
"dateTime": graphql.String(pm.DateTime),
|
|
||||||
"priorityIndicator": graphql.String(pm.PriorityIndicator),
|
|
||||||
"primaryAddress": graphql.String(pm.PrimaryAddress),
|
|
||||||
"secondaryAddresses": graphql.String("second"),
|
|
||||||
"originator": graphql.String(pm.Originator),
|
|
||||||
"originatorDateTime": graphql.String(pm.OriginatorDateTime),
|
|
||||||
"category": graphql.String(pm.Category),
|
|
||||||
"bodyAndFooter": graphql.String(pm.BodyAndFooter),
|
|
||||||
"bodyData": graphql.String("{}"),
|
|
||||||
"receivedAt": pm.ReceivedAt.Format(time.RFC3339),
|
|
||||||
"parsedAt": pm.ParsedAt.Format(time.RFC3339),
|
|
||||||
// "dispatchedAt": pm.DispatchedAt.Format(time.RFC3339),
|
|
||||||
"needDispatch": graphql.Boolean(false),
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
// Execute the mutation with the variables
|
|
||||||
err := hr.hasuraClient.Mutate(ctx, &mutation, variables)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// fmt.Printf("Inserted new message with ID: %v\n", resp)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ package repository
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"caatsm/internal/domain"
|
"caatsm/internal/domain"
|
||||||
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/hasura/go-graphql-client"
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
@@ -15,6 +17,52 @@ func TestConfig(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var _ = Describe("Repositories", func() {
|
var _ = Describe("Repositories", func() {
|
||||||
|
Context("Just a simple test", func() {
|
||||||
|
|
||||||
|
// Define a struct for the mutation input to match the expected GraphQL input
|
||||||
|
// Define a struct for the mutation input to match the expected GraphQL input
|
||||||
|
type aviation_user_insert_input struct {
|
||||||
|
Name graphql.String `json:"name"`
|
||||||
|
Email graphql.String `json:"email"`
|
||||||
|
UpdateAt graphql.String `json:"update_at"` // Use string for timestamp
|
||||||
|
}
|
||||||
|
// Get the current time in RFC3339 format
|
||||||
|
currentTime := time.Now().Format(time.RFC3339)
|
||||||
|
|
||||||
|
input := aviation_user_insert_input{
|
||||||
|
Name: graphql.String("new"),
|
||||||
|
Email: graphql.String("2@2.com"),
|
||||||
|
UpdateAt: graphql.String(currentTime), // Use formatted string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define the mutation
|
||||||
|
var mutation struct {
|
||||||
|
InsertAviationUserOne struct {
|
||||||
|
ID int `json:"id"`
|
||||||
|
Name string
|
||||||
|
} `graphql:"insert_aviation_user_one(object: $object)"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define the mutation variables
|
||||||
|
// Define the mutation variables
|
||||||
|
variables := map[string]interface{}{
|
||||||
|
"object": input,
|
||||||
|
}
|
||||||
|
// Define the mutation
|
||||||
|
|
||||||
|
client := graphql.NewClient("http://localhost:8080/v1/graphql", nil)
|
||||||
|
|
||||||
|
err := client.Mutate(context.Background(), &mutation, variables)
|
||||||
|
It("should not error", func() {
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
})
|
||||||
|
|
||||||
|
It("name should be new", func() {
|
||||||
|
Expect(mutation.InsertAviationUserOne.Name).To(Equal("new"))
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
Context("Hasura Repository", func() {
|
Context("Hasura Repository", func() {
|
||||||
// var repository *HasuraRepository
|
// var repository *HasuraRepository
|
||||||
var uuid = "uuid"
|
var uuid = "uuid"
|
||||||
@@ -34,8 +82,8 @@ var _ = Describe("Repositories", func() {
|
|||||||
OriginatorDateTime: "originator_date_time",
|
OriginatorDateTime: "originator_date_time",
|
||||||
Category: "category",
|
Category: "category",
|
||||||
BodyAndFooter: "body_and_footer",
|
BodyAndFooter: "body_and_footer",
|
||||||
BodyData: nil,
|
// BodyData: &interface{},
|
||||||
ReceivedAt: time.Now(),
|
ReceivedAt: time.Now(),
|
||||||
}
|
}
|
||||||
err := repository.InsertParsedMessage(parseMessage)
|
err := repository.InsertParsedMessage(parseMessage)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+1289
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user