Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle service accounts #127

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ginkgo-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: "1.20"
- uses: actions/checkout@v3
name: checkout project
- name: run ginkgo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: "1.20"
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
2 changes: 1 addition & 1 deletion cmd/export-service/api_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
middleware "github.com/go-chi/chi/v5/middleware"
redoc "github.com/go-openapi/runtime/middleware"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/redhatinsights/platform-go-middlewares/identity"
"github.com/redhatinsights/platform-go-middlewares/v2/identity"
"github.com/redhatinsights/platform-go-middlewares/request_id"
"go.uber.org/zap"

Expand Down
8 changes: 4 additions & 4 deletions exports/exports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"strings"
Expand All @@ -16,7 +16,7 @@ import (
. "github.com/onsi/gomega"
"go.uber.org/zap"

"github.com/redhatinsights/platform-go-middlewares/identity"
"github.com/redhatinsights/platform-go-middlewares/v2/identity"

"github.com/redhatinsights/export-service-go/config"
"github.com/redhatinsights/export-service-go/exports"
Expand All @@ -26,7 +26,7 @@ import (
es3 "github.com/redhatinsights/export-service-go/s3"
)

const debugHeader string = "eyJpZGVudGl0eSI6eyJhY2NvdW50X251bWJlciI6IjEwMDAxIiwib3JnX2lkIjoiMTAwMDAwMDEiLCJpbnRlcm5hbCI6eyJvcmdfaWQiOiIxMDAwMDAwMSJ9LCJ0eXBlIjoiVXNlciIsInVzZXIiOnsidXNlcm5hbWUiOiJ1c2VyX2RldiJ9fX0K"
const debugHeader string = "eyJpZGVudGl0eSI6eyJhY2NvdW50X251bWJlciI6IjEwMDAxIiwib3JnX2lkIjoiMTAwMDAwMDEiLCJpbnRlcm5hbCI6eyJvcmdfaWQiOiIxMDAwMDAwMSJ9LCJ0eXBlIjoiVXNlciIsInVzZXIiOnsidXNlcm5hbWUiOiJ1c2VyX2RldiJ9fX0="
const formatDateTime string = "2006-01-02T15:04:05Z" // ISO 8601

func AddDebugUserIdentity(req *http.Request) {
Expand Down Expand Up @@ -638,7 +638,7 @@ func modifyExportSources(exportName string, application string, resource string)
}

func getExportNames(rr *httptest.ResponseRecorder) []string {
b, err := ioutil.ReadAll(rr.Body)
b, err := io.ReadAll(rr.Body)
Expect(err).ShouldNot(HaveOccurred())

var exportResponse map[string]interface{}
Expand Down
2 changes: 1 addition & 1 deletion exports/internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
chi "github.com/go-chi/chi/v5"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/redhatinsights/platform-go-middlewares/identity"
"github.com/redhatinsights/platform-go-middlewares/v2/identity"
"go.uber.org/zap"

"github.com/redhatinsights/export-service-go/config"
Expand Down
31 changes: 16 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
module github.com/redhatinsights/export-service-go

go 1.18
go 1.20

require (
github.com/RedHatInsights/event-schemas-go v1.0.5
github.com/aws/aws-sdk-go v1.38.51
github.com/aws/aws-sdk-go v1.50.0
github.com/aws/aws-sdk-go-v2 v1.16.2
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.5
github.com/aws/aws-sdk-go-v2/service/s3 v1.26.5
github.com/confluentinc/confluent-kafka-go v1.8.2
github.com/fergusstrange/embedded-postgres v1.19.0
github.com/go-chi/chi/v5 v5.0.7
github.com/go-chi/chi/v5 v5.0.11
github.com/go-openapi/runtime v0.23.3
github.com/golang-migrate/migrate/v4 v4.15.2
github.com/google/uuid v1.3.0
github.com/lib/pq v1.10.7
github.com/onsi/ginkgo/v2 v2.9.5
github.com/onsi/gomega v1.27.6
github.com/onsi/ginkgo/v2 v2.15.0
github.com/onsi/gomega v1.31.1
github.com/prometheus/client_golang v1.12.1
github.com/redhatinsights/app-common-go v1.6.6
github.com/redhatinsights/platform-go-middlewares v0.12.0
github.com/redhatinsights/platform-go-middlewares/v2 v2.0.0-beta.2
github.com/spf13/cobra v1.1.3
github.com/spf13/viper v1.11.0
go.uber.org/zap v1.21.0
go.uber.org/zap v1.26.0
gorm.io/datatypes v1.0.6
gorm.io/driver/postgres v1.3.4
gorm.io/gorm v1.23.4
Expand All @@ -43,8 +44,8 @@ require (
github.com/aws/smithy-go v1.11.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-openapi/analysis v0.21.2 // indirect
github.com/go-openapi/errors v0.20.2 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand All @@ -58,7 +59,7 @@ require (
github.com/go-stack/stack v1.8.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand Down Expand Up @@ -86,7 +87,7 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -95,12 +96,12 @@ require (
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
go.mongodb.org/mongo-driver v1.8.3 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/tools v0.16.1 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading