Skip to content

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Aug 12, 2023
1 parent 097f4ea commit c85b82d
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 558 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lint:
golangci-lint run --go=1.18
golangci-lint run

test:
go test ./...
6 changes: 3 additions & 3 deletions database/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
type (
PostgreSQLContainer struct {
testcontainers.Container
cfg PostgreSQLContainerConfig
Config PostgreSQLContainerConfig
mappedPort nat.Port
}

Expand Down Expand Up @@ -63,14 +63,14 @@ func NewPostgreSQLContainer(ctx context.Context, cfg PostgreSQLContainerConfig)

return &PostgreSQLContainer{
Container: container,
cfg: cfg,
Config: cfg,
mappedPort: mappedPort,
}, nil
}

// GetDSN -
func (c PostgreSQLContainer) GetDSN() string {
return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", c.cfg.User, c.cfg.Password, c.cfg.Host, c.mappedPort.Port(), c.cfg.Database)
return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", c.Config.User, c.Config.Password, c.Config.Host, c.mappedPort.Port(), c.Config.Database)
}

// MappedPort -
Expand Down
8 changes: 4 additions & 4 deletions database/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ func (s *TestSuite) SetupSuite() {

s.db, err = newDatabase(ctx, s.typ, config.Database{
Kind: config.DBKindPostgres,
User: s.psqlContainer.cfg.User,
Database: s.psqlContainer.cfg.Database,
Password: s.psqlContainer.cfg.Password,
Host: s.psqlContainer.cfg.Host,
User: s.psqlContainer.Config.User,
Database: s.psqlContainer.Config.Database,
Password: s.psqlContainer.Config.Password,
Host: s.psqlContainer.Config.Host,
Port: s.psqlContainer.MappedPort().Int(),
})
s.Require().NoError(err)
Expand Down
58 changes: 27 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
module github.com/dipdup-net/go-lib

go 1.19
go 1.20

require (
github.com/dave/jennifer v1.4.1
github.com/dave/jennifer v1.7.0
github.com/docker/go-connections v0.4.0
github.com/ebellocchia/go-base58 v0.1.0
github.com/go-pg/pg/v10 v10.10.6
github.com/go-playground/validator/v10 v10.9.0
github.com/go-playground/validator/v10 v10.15.0
github.com/go-testfixtures/testfixtures/v3 v3.9.0
github.com/golang/mock v1.6.0
github.com/gorilla/websocket v1.4.2
github.com/iancoleman/strcase v0.2.0
github.com/gorilla/websocket v1.5.0
github.com/iancoleman/strcase v0.3.0
github.com/json-iterator/go v1.1.12
github.com/lib/pq v1.10.9
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/rs/zerolog v1.29.1
github.com/sergi/go-diff v1.2.0
github.com/prometheus/client_golang v1.16.0
github.com/rs/zerolog v1.30.0
github.com/sergi/go-diff v1.3.1
github.com/shopspring/decimal v1.3.1
github.com/stretchr/testify v1.8.4
github.com/testcontainers/testcontainers-go v0.22.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.22.0
github.com/tidwall/gjson v1.12.1
github.com/tidwall/gjson v1.16.0
github.com/uptrace/bun v1.1.14
github.com/uptrace/bun/dialect/pgdialect v1.1.14
github.com/uptrace/bun/driver/pgdriver v1.1.14
github.com/yhirose/go-peg v0.0.0-20210804202551-de25d6753cf1
golang.org/x/crypto v0.9.0
golang.org/x/text v0.9.0
golang.org/x/crypto v0.12.0
golang.org/x/text v0.12.0
gopkg.in/yaml.v3 v3.0.1
gorm.io/driver/mysql v1.2.1
gorm.io/driver/postgres v1.2.3
gorm.io/driver/sqlite v1.2.6
gorm.io/gorm v1.22.4
gorm.io/driver/mysql v1.5.1
gorm.io/driver/postgres v1.5.2
gorm.io/driver/sqlite v1.5.2
gorm.io/gorm v1.25.3
)

require (
Expand All @@ -52,31 +52,27 @@ require (
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v24.0.5+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.6.1 // indirect
github.com/go-pg/zerochecker v0.2.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // 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.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgx/v4 v4.18.1 // indirect
github.com/jackc/pgx/v5 v5.4.3 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.3 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.16 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/moby/patternmatcher v0.5.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
Expand All @@ -91,12 +87,12 @@ require (
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pmezard/go-difflib v1.0.0 // 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.10.1 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
github.com/vmihailenco/bufpool v0.1.11 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
Expand All @@ -106,8 +102,8 @@ require (
go.opentelemetry.io/otel/trace v1.15.0 // indirect
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.57.0 // indirect
Expand Down
Loading

0 comments on commit c85b82d

Please sign in to comment.