Skip to content

Commit

Permalink
Merge pull request #643 from kinvolk/vbatts/backend_update
Browse files Browse the repository at this point in the history
vbatts/backend update
  • Loading branch information
yolossn authored Mar 20, 2023
2 parents 28bb2f4 + 59b35b0 commit 9692176
Show file tree
Hide file tree
Showing 26 changed files with 220 additions and 330 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:

steps:

- name: Set up Go 1.17
- name: Set up Go 1.19
uses: actions/setup-go@v1
with:
go-version: 1.17.x
go-version: 1.19.x
id: go

- name: Check out code
uses: actions/checkout@v2

- name: Build, Lint & Check
run: |
make ci
make all ci
working-directory: backend
1 change: 1 addition & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ coverage.out
tools/go-bindata
tools/golangci-lint
tools/swag
tools/oapi-codegen
.env
22 changes: 11 additions & 11 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ bin/userctl:
go build -o bin/userctl ./cmd/userctl

tools/go-bindata: go.mod go.sum
env GOBIN=$(CURDIR)/tools/ go install github.com/kevinburke/go-bindata/go-bindata@v3.22.0
env GOBIN=$(CURDIR)/tools/ go install github.com/kevinburke/go-bindata/go-bindata@v3.24.0

tools/golangci-lint: go.mod go.sum
env GOBIN=$(CURDIR)/tools/ go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.1
env GOBIN=$(CURDIR)/tools/ go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2

tools/swag:
env GOBIN=$(CURDIR)/tools/ go install github.com/swaggo/swag/cmd/swag@v1.7.4
env GOBIN=$(CURDIR)/tools/ go install github.com/swaggo/swag/cmd/swag@v1.8.10

.PHONY: ci
ci: build test-clean-work-tree-backend check-backend-with-container
Expand All @@ -108,13 +108,13 @@ code-checks: tools/golangci-lint
swagger-init: tools/swag
./tools/swag init -g cmd/userctl/main.go -o api

.PHONY: tools/codegen
tools/codegen:
go install github.com/deepmap/oapi-codegen/cmd/[email protected].2
.PHONY: tools/oapi-codegen
tools/oapi-codegen:
env GOBIN=$(CURDIR)/tools/ go install github.com/deepmap/oapi-codegen/cmd/[email protected].4

.PHONY: codegen
codegen: tools/codegen
PATH=$$GOPATH/bin:$$PATH oapi-codegen --old-config-style --generate=server --package codegen -o ./pkg/codegen/server.gen.go ./api/spec.yaml;
PATH=$$GOPATH/bin:$$PATH oapi-codegen --old-config-style --generate=spec --package codegen -o ./pkg/codegen/spec.gen.go ./api/spec.yaml;
PATH=$$GOPATH/bin:$$PATH oapi-codegen --old-config-style --generate=client --package codegen -o ./pkg/codegen/client.gen.go ./api/spec.yaml;
PATH=$$GOPATH/bin:$$PATH oapi-codegen --old-config-style --generate=types --package codegen -o ./pkg/codegen/types.gen.go ./api/spec.yaml;
codegen: tools/oapi-codegen
PATH=$$GOPATH/bin:$$PATH ./tools/oapi-codegen --old-config-style --generate=server --package codegen -o ./pkg/codegen/server.gen.go ./api/spec.yaml;
PATH=$$GOPATH/bin:$$PATH ./tools/oapi-codegen --old-config-style --generate=spec --package codegen -o ./pkg/codegen/spec.gen.go ./api/spec.yaml;
PATH=$$GOPATH/bin:$$PATH ./tools/oapi-codegen --old-config-style --generate=client --package codegen -o ./pkg/codegen/client.gen.go ./api/spec.yaml;
PATH=$$GOPATH/bin:$$PATH ./tools/oapi-codegen --old-config-style --generate=types --package codegen -o ./pkg/codegen/types.gen.go ./api/spec.yaml;
70 changes: 36 additions & 34 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ go 1.19

require (
github.com/blang/semver/v4 v4.0.0
github.com/coreos/go-oidc/v3 v3.4.0
github.com/deepmap/oapi-codegen v1.12.2
github.com/coreos/go-oidc/v3 v3.5.0
github.com/deepmap/oapi-codegen v1.12.4
github.com/doug-martin/goqu/v9 v9.18.0
github.com/getkin/kin-openapi v0.107.0
github.com/getkin/kin-openapi v0.114.0
github.com/golangci/golangci-lint v1.41.1
github.com/google/go-github/v28 v28.1.1
github.com/google/uuid v1.3.0
github.com/gorilla/securecookie v1.1.1
github.com/jackc/pgx/v4 v4.17.2
github.com/jackc/pgx/v4 v4.18.1
github.com/jinzhu/copier v0.3.4
github.com/jmoiron/sqlx v1.3.5
github.com/kevinburke/go-bindata v3.22.0+incompatible
github.com/kinvolk/go-omaha v0.0.2-0.20221206142015-1518a03b832b
github.com/knadh/koanf v1.4.4
github.com/labstack/echo-contrib v0.13.0
github.com/labstack/echo/v4 v4.9.1
github.com/knadh/koanf v1.5.0
github.com/labstack/echo-contrib v0.14.1
github.com/labstack/echo/v4 v4.10.2
github.com/labstack/gommon v0.4.0
github.com/lib/pq v1.10.7
github.com/oauth2-proxy/mockoidc v0.0.0-20220308204021-b9169deeb282
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.13.1
github.com/rs/zerolog v1.28.0
github.com/rubenv/sql-migrate v1.2.0
github.com/prometheus/client_golang v1.14.0
github.com/rs/zerolog v1.29.0
github.com/rubenv/sql-migrate v1.4.0
github.com/ryanuber/go-glob v1.0.0
github.com/stretchr/testify v1.8.1
github.com/tidwall/gjson v1.14.3
golang.org/x/oauth2 v0.1.0
github.com/stretchr/testify v1.8.2
github.com/tidwall/gjson v1.14.4
golang.org/x/oauth2 v0.6.0
golang.org/x/sync v0.1.0
gopkg.in/guregu/null.v4 v4.0.0
)
Expand All @@ -48,7 +48,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bkielbasa/cyclop v1.2.0 // indirect
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/charithe/durationcheck v0.0.8 // indirect
github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect
github.com/daixiang0/gci v0.2.8 // indirect
Expand All @@ -62,7 +62,8 @@ require (
github.com/fzipp/gocyclo v0.3.1 // indirect
github.com/go-critic/go-critic v0.5.6 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-toolsmith/astcast v1.0.0 // indirect
github.com/go-toolsmith/astcopy v1.0.0 // indirect
Expand All @@ -75,7 +76,7 @@ require (
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect
Expand All @@ -85,26 +86,26 @@ require (
github.com/golangci/misspell v0.3.5 // indirect
github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gostaticanalysis/analysisutil v0.4.1 // indirect
github.com/gostaticanalysis/comment v1.4.1 // indirect
github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 // indirect
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/invopop/yaml v0.2.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.13.0 // indirect
github.com/jackc/pgconn v1.14.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.12.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jgautheron/goconst v1.5.1 // indirect
github.com/jingyugao/rowserrcheck v1.1.0 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
Expand All @@ -122,7 +123,7 @@ require (
github.com/maratori/testpackage v1.0.1 // indirect
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
Expand All @@ -140,12 +141,13 @@ require (
github.com/nishanths/predeclared v0.2.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/perimeterx/marshmallow v1.1.4 // indirect
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v0.0.0-20210510181950-ab96adb96fea // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/quasilyte/go-ruleguard v0.3.4 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
github.com/ryancurrah/gomodguard v1.2.2 // indirect
Expand All @@ -157,7 +159,7 @@ require (
github.com/sonatard/noctx v0.0.1 // indirect
github.com/sourcegraph/go-diff v0.6.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.2.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand All @@ -178,15 +180,15 @@ require (
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/yeya24/promlinter v0.1.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.1.0 // indirect
golang.org/x/tools v0.2.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.29.0 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 9692176

Please sign in to comment.