Skip to content

Commit

Permalink
feat: upgrade go-libs
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Jan 2, 2023
1 parent 78babd8 commit 2df36fd
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 130 deletions.
8 changes: 4 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/formancehq/go-libs/sharedlogging"
"github.com/formancehq/go-libs/sharedlogging/sharedlogginglogrus"
"github.com/formancehq/go-libs/logging"
"github.com/formancehq/go-libs/logging/logginglogrus"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -33,8 +33,8 @@ var rootCmd = &cobra.Command{
logrusLogger.SetLevel(logrus.DebugLevel)
logrusLogger.Infof("Debug mode enabled.")
}
logger := sharedlogginglogrus.New(logrusLogger)
sharedlogging.SetFactory(sharedlogging.StaticLoggerFactory(logger))
logger := logginglogrus.New(logrusLogger)
logging.SetFactory(logging.StaticLoggerFactory(logger))

return nil
},
Expand Down
12 changes: 6 additions & 6 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/formancehq/auth/pkg/delegatedauth"
"github.com/formancehq/auth/pkg/oidc"
"github.com/formancehq/auth/pkg/storage/sqlstorage"
"github.com/formancehq/go-libs/sharedapi"
"github.com/formancehq/go-libs/sharedlogging"
"github.com/formancehq/go-libs/sharedotlp/pkg/sharedotlptraces"
sharedapi "github.com/formancehq/go-libs/api"
"github.com/formancehq/go-libs/logging"
"github.com/formancehq/go-libs/otlp/otlptraces"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -152,12 +152,12 @@ var serveCmd = &cobra.Command{
viper.GetBool(debugFlag), key, o.Clients...),
delegatedauth.Module(),
fx.Invoke(func() {
sharedlogging.Infof("App started.")
logging.Infof("App started.")
}),
fx.NopLogger,
}

options = append(options, sharedotlptraces.CLITracesModule(viper.GetViper()))
options = append(options, otlptraces.CLITracesModule(viper.GetViper()))

app := fx.New(options...)
err = app.Start(cmd.Context())
Expand All @@ -182,5 +182,5 @@ func init() {

serveCmd.Flags().String(configFlag, "config", "Config file name without extension")

sharedotlptraces.InitOTLPTracesFlags(serveCmd.Flags())
otlptraces.InitOTLPTracesFlags(serveCmd.Flags())
}
57 changes: 27 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,24 @@ module github.com/formancehq/auth
go 1.18

require (
github.com/formancehq/go-libs v1.3.0
github.com/formancehq/go-libs/sharedapi v0.0.0-20221216091331-d43b8d37bc84
github.com/formancehq/go-libs/sharedhealth v0.0.0-20221124082706-09db8cefd5b4
github.com/formancehq/go-libs/sharedotlp v0.0.0-20221124082706-09db8cefd5b4
github.com/formancehq/go-libs v1.4.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/oauth2-proxy/mockoidc v0.0.0-20220308204021-b9169deeb282
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.13.0
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.14.0
github.com/stretchr/testify v1.8.1
github.com/zitadel/oidc v1.8.0
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.35.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4
go.opentelemetry.io/otel v1.11.1
go.opentelemetry.io/otel/trace v1.11.1
go.uber.org/fx v1.18.1
golang.org/x/oauth2 v0.2.0
golang.org/x/text v0.4.0
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel/trace v1.11.2
go.uber.org/fx v1.18.2
golang.org/x/oauth2 v0.3.0
golang.org/x/text v0.5.0
gopkg.in/square/go-jose.v2 v2.6.0
gorm.io/driver/postgres v1.3.10
gorm.io/driver/sqlite v1.3.6
Expand All @@ -35,14 +32,14 @@ require (
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/schema v1.2.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
Expand All @@ -56,37 +53,37 @@ require (
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/lib/pq v1.10.6 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-sqlite3 v1.14.12 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/zitadel/logging v0.3.4 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.11.1 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.11.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.11.1 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.12.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.11.2 // indirect
go.opentelemetry.io/otel/metric v0.33.0 // indirect
go.opentelemetry.io/otel/sdk v1.11.1 // indirect
go.opentelemetry.io/otel/sdk v1.11.2 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/dig v1.15.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.23.0 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/sys v0.2.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
Expand Down
Loading

0 comments on commit 2df36fd

Please sign in to comment.