third_party: add libpg_query and sqlc
This adds sqlc, a SQL query code generator for Go (and other languages).
It in turn requires pganalyze's libpg_query, which is a C library for
parsing PostgreSQL queries.
To test:
$ bazel build @com_github_kyleconroy_sqlc//cmd/sqlc
In the future this will be used by Bazel rules to generate sources at
build time.
Change-Id: I369c9ab503e8ce6952fd3f73c233dd3d59922358
Reviewed-on: https://review.monogon.dev/c/monogon/+/882
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/go.mod b/go.mod
index d3687c7..98ff875 100644
--- a/go.mod
+++ b/go.mod
@@ -82,6 +82,7 @@
github.com/google/uuid v1.3.0
github.com/insomniacslk/dhcp v0.0.0-20220119180841-3c283ff8b7dd
github.com/joho/godotenv v1.4.0
+ github.com/kyleconroy/sqlc v1.15.0
github.com/mattn/go-shellwords v1.0.12
github.com/mdlayher/raw v0.1.0
github.com/opencontainers/runc v1.1.3
@@ -89,7 +90,7 @@
github.com/pkg/errors v0.9.1
github.com/rekby/gpt v0.0.0-20200614112001-7da10aec5566
github.com/sbezverk/nfproxy v0.0.0-20210112155058-0d98b4a69f0c
- github.com/spf13/cobra v1.4.0
+ github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.1
github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5
@@ -108,7 +109,7 @@
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220208144051-fde48d68ee68
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21
google.golang.org/grpc v1.46.0
- google.golang.org/protobuf v1.28.0
+ google.golang.org/protobuf v1.28.1
gvisor.dev/gvisor v0.0.0-20220315202956-f1399ecf1672
k8s.io/api v0.24.2
k8s.io/apimachinery v0.24.2
@@ -148,13 +149,14 @@
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/alexflint/go-filemutex v1.1.0 // indirect
- github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed // indirect
+ github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220626175859-9abda183db8e // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/aws/aws-sdk-go v1.44.9 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
+ github.com/bytecodealliance/wasmtime-go v0.39.0 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect
@@ -174,9 +176,10 @@
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/cosiner/argv v0.1.0 // indirect
- github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
+ github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/creack/pty v1.1.11 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
+ github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd // indirect
github.com/derekparker/trie v0.0.0-20200317170641-1fdf38b7b0e9 // indirect
@@ -234,6 +237,7 @@
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9 // indirect
+ github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
@@ -284,8 +288,12 @@
github.com/oschwald/geoip2-golang v1.7.0 // indirect
github.com/oschwald/maxminddb-golang v1.9.0 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
+ github.com/pganalyze/pg_query_go/v2 v2.1.2 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
+ github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect
+ github.com/pingcap/log v0.0.0-20210906054005-afc726e70354 // indirect
+ github.com/pingcap/tidb/parser v0.0.0-20220725134311-c80026e61f00 // indirect
github.com/pkg/xattr v0.4.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 // indirect
@@ -294,6 +302,7 @@
github.com/prometheus/common v0.34.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quobyte/api v0.1.8 // indirect
+ github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 // indirect
@@ -335,8 +344,9 @@
go.opentelemetry.io/proto/otlp v0.11.0 // indirect
go.starlark.net v0.0.0-20210223155950-e043a3d3c984 // indirect
go.uber.org/atomic v1.9.0 // indirect
- go.uber.org/zap v1.19.0 // indirect
+ go.uber.org/zap v1.19.1 // indirect
golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4 // indirect
+ golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect