Skip to content

Commit

Permalink
Update go module (#44)
Browse files Browse the repository at this point in the history
* prevent getPricesInReferenceCurrency returning error

* update go module
  • Loading branch information
sekulicd authored Sep 8, 2022
1 parent db40d01 commit 72c2597
Show file tree
Hide file tree
Showing 33 changed files with 59 additions and 60 deletions.
2 changes: 1 addition & 1 deletion cmd/tdexa/balances.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"context"
tdexav1 "github.com/tdex-network/tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"github.com/urfave/cli/v2"
tdexav1 "tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
)

var listBalancesCmd = &cli.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/tdexa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/btcsuite/btcutil"
"github.com/gogo/protobuf/jsonpb"
"github.com/gogo/protobuf/proto"
tdexav1 "github.com/tdex-network/tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"github.com/urfave/cli/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand All @@ -18,7 +19,6 @@ import (
"os"
"path"
"strconv"
tdexav1 "tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/tdexa/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"context"
"errors"
tdexav1 "github.com/tdex-network/tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"github.com/urfave/cli/v2"
"strings"
tdexav1 "tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
)

var marketsCmd = &cli.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/tdexa/prices.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"context"

tdexav1 "github.com/tdex-network/tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"github.com/urfave/cli/v2"
tdexav1 "tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
)

var listPricesCmd = &cli.Command{
Expand Down
15 changes: 7 additions & 8 deletions cmd/tdexad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ package main

import (
"context"
"github.com/tdex-network/tdex-analytics/internal/config"
"github.com/tdex-network/tdex-analytics/internal/core/application"
dbinflux "github.com/tdex-network/tdex-analytics/internal/infrastructure/db/influx"
dbpg "github.com/tdex-network/tdex-analytics/internal/infrastructure/db/pg"
tdexagrpc "github.com/tdex-network/tdex-analytics/internal/interface/grpc"
"github.com/tdex-network/tdex-analytics/pkg/rater"
tdexmarketloader "github.com/tdex-network/tdex-analytics/pkg/tdex-market-loader"
"log"
"os"
"os/signal"
"strconv"
"syscall"
"tdex-analytics/internal/config"
"tdex-analytics/internal/core/application"
dbinflux "tdex-analytics/internal/infrastructure/db/influx"
dbpg "tdex-analytics/internal/infrastructure/db/pg"
tdexagrpc "tdex-analytics/internal/interface/grpc"
"tdex-analytics/pkg/rater"
tdexmarketloader "tdex-analytics/pkg/tdex-market-loader"
)

func main() {
Expand Down Expand Up @@ -91,7 +91,6 @@ func main() {
marketSvc,
opts,
)

if err != nil {
log.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module tdex-analytics
module github.com/tdex-network/tdex-analytics

go 1.16

Expand Down
4 changes: 2 additions & 2 deletions internal/core/application/market_balance_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"github.com/robfig/cron/v3"
log "github.com/sirupsen/logrus"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
tdexmarketloader "github.com/tdex-network/tdex-analytics/pkg/tdex-market-loader"
"strconv"
"tdex-analytics/internal/core/domain"
tdexmarketloader "tdex-analytics/pkg/tdex-market-loader"
"time"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/core/application/market_loader_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"github.com/robfig/cron/v3"
log "github.com/sirupsen/logrus"
"tdex-analytics/internal/core/domain"
tdexmarketloader "tdex-analytics/pkg/tdex-market-loader"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
tdexmarketloader "github.com/tdex-network/tdex-analytics/pkg/tdex-market-loader"
"time"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/core/application/market_price_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package application
import (
"context"
"fmt"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/port"
tdexmarketloader "github.com/tdex-network/tdex-analytics/pkg/tdex-market-loader"
"strconv"
"tdex-analytics/internal/core/domain"
"tdex-analytics/internal/core/port"
tdexmarketloader "tdex-analytics/pkg/tdex-market-loader"
"time"

"github.com/robfig/cron/v3"
Expand Down
4 changes: 2 additions & 2 deletions internal/core/application/market_price_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package application

import (
"context"
"tdex-analytics/internal/core/domain"
"tdex-analytics/internal/core/port"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/port"
"testing"

"github.com/shopspring/decimal"
Expand Down
2 changes: 1 addition & 1 deletion internal/core/application/market_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package application

import (
"context"
"tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
)

type MarketService interface {
Expand Down
4 changes: 2 additions & 2 deletions internal/core/application/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
validation "github.com/go-ozzo/ozzo-validation/v4"
"github.com/go-ozzo/ozzo-validation/v4/is"
"github.com/shopspring/decimal"
"tdex-analytics/internal/core/domain"
"tdex-analytics/pkg/hexerr"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/pkg/hexerr"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/infrastructure/db/influx/influx_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dbinflux

import (
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
"tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
"tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"time"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
"github.com/shopspring/decimal"
"tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"time"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/infrastructure/db/pg/market_repository_iml.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"context"
"fmt"
"github.com/lib/pq"
"tdex-analytics/internal/core/domain"
"tdex-analytics/internal/infrastructure/db/pg/sqlc/queries"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/infrastructure/db/pg/sqlc/queries"
)

const (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dbpg

import (
"tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"testing"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/infrastructure/db/pg/postgres_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"github.com/go-testfixtures/testfixtures/v3"
"github.com/golang-migrate/migrate/v4"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/infrastructure/db/pg/sqlc/queries"
"sync"
"tdex-analytics/internal/core/domain"
"tdex-analytics/internal/infrastructure/db/pg/sqlc/queries"

"github.com/golang-migrate/migrate/v4/database/postgres"

Expand Down
4 changes: 2 additions & 2 deletions internal/interface/grpc/handler/analytics_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package grpchandler

import (
"context"
tdexav1 "tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"tdex-analytics/internal/core/application"
tdexav1 "github.com/tdex-network/tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"github.com/tdex-network/tdex-analytics/internal/core/application"
)

type analyticsHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/interface/grpc/interceptor/error_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package interceptor

import (
"context"
"tdex-analytics/pkg/hexerr"
"github.com/tdex-network/tdex-analytics/pkg/hexerr"

log "github.com/sirupsen/logrus"

Expand Down
8 changes: 4 additions & 4 deletions internal/interface/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package tdexagrpc

import (
"context"
tdexav1 "github.com/tdex-network/tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"github.com/tdex-network/tdex-analytics/internal/core/application"
grpchandler "github.com/tdex-network/tdex-analytics/internal/interface/grpc/handler"
"github.com/tdex-network/tdex-analytics/internal/interface/grpc/interceptor"
"net/http"
"strings"
tdexav1 "tdex-analytics/api-spec/protobuf/gen/tdexa/v1"
"tdex-analytics/internal/core/application"
grpchandler "tdex-analytics/internal/interface/grpc/handler"
"tdex-analytics/internal/interface/grpc/interceptor"
"time"

"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
Expand Down
2 changes: 1 addition & 1 deletion pkg/rater/exchange_rates_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/tdex-network/tdex-analytics/internal/core/port"
"golang.org/x/time/rate"
"io/ioutil"
"net/http"
"net/url"
"strings"
"sync"
"tdex-analytics/internal/core/port"
"time"

"github.com/shopspring/decimal"
Expand Down
2 changes: 1 addition & 1 deletion pkg/rater/exchange_rates_wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package rater
import (
"context"
"fmt"
"github.com/tdex-network/tdex-analytics/internal/core/port"
"golang.org/x/time/rate"
"net/http"
"tdex-analytics/internal/core/port"
"testing"
"time"

Expand Down
2 changes: 1 addition & 1 deletion pkg/tdex-market-loader/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"github.com/shopspring/decimal"
log "github.com/sirupsen/logrus"
tdexv1 "github.com/tdex-network/tdex-analytics/api-spec/protobuf/gen/tdex/v1"
"golang.org/x/net/proxy"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand All @@ -15,7 +16,6 @@ import (
"net"
"net/http"
"strings"
tdexv1 "tdex-analytics/api-spec/protobuf/gen/tdex/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion test/application/market_balance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package influxdbtest
import (
"context"
"errors"
"github.com/tdex-network/tdex-analytics/internal/core/application"
"math"
"tdex-analytics/internal/core/application"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion test/application/market_price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package influxdbtest
import (
"context"
"errors"
"github.com/tdex-network/tdex-analytics/internal/core/application"
"math"
"tdex-analytics/internal/core/application"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion test/application/market_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package influxdbtest

import (
"context"
"tdex-analytics/internal/core/application"
"github.com/tdex-network/tdex-analytics/internal/core/application"
)

func (a *AppSvcTestSuit) TestGetMarketsForFilter() {
Expand Down
10 changes: 5 additions & 5 deletions test/application/test_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package influxdbtest

import (
"context"
"github.com/tdex-network/tdex-analytics/internal/core/application"
dbinflux "github.com/tdex-network/tdex-analytics/internal/infrastructure/db/influx"
dbpg "github.com/tdex-network/tdex-analytics/internal/infrastructure/db/pg"
"github.com/tdex-network/tdex-analytics/pkg/rater"
tdexmarketloader "github.com/tdex-network/tdex-analytics/pkg/tdex-market-loader"
"os"
"tdex-analytics/internal/core/application"
dbinflux "tdex-analytics/internal/infrastructure/db/influx"
dbpg "tdex-analytics/internal/infrastructure/db/pg"
"tdex-analytics/pkg/rater"
tdexmarketloader "tdex-analytics/pkg/tdex-market-loader"

"github.com/stretchr/testify/suite"
)
Expand Down
6 changes: 3 additions & 3 deletions test/influx-db/market_balance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package influxdbtest

import (
"context"
"github.com/tdex-network/tdex-analytics/internal/core/application"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
dbinflux "github.com/tdex-network/tdex-analytics/internal/infrastructure/db/influx"
"os"
"tdex-analytics/internal/core/application"
"tdex-analytics/internal/core/domain"
dbinflux "tdex-analytics/internal/infrastructure/db/influx"
"time"
)

Expand Down
4 changes: 2 additions & 2 deletions test/influx-db/market_price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package influxdbtest
import (
"context"
"github.com/shopspring/decimal"
"tdex-analytics/internal/core/application"
"tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/application"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion test/influx-db/test_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package influxdbtest

import (
"github.com/stretchr/testify/suite"
dbinflux "github.com/tdex-network/tdex-analytics/internal/infrastructure/db/influx"
"os"
dbinflux "tdex-analytics/internal/infrastructure/db/influx"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions test/pg-db/market_repository_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package pgtest

import (
"context"
"tdex-analytics/internal/core/domain"
"github.com/tdex-network/tdex-analytics/internal/core/domain"
)

func (s *PgDbTestSuite) TestInsertAndFetchMarket() {
Expand Down Expand Up @@ -176,4 +176,4 @@ func (s *PgDbTestSuite) TestGetMarketsForFilterWithPagination() {
}

s.Equal(1, len(markets))
}
}
2 changes: 1 addition & 1 deletion test/pg-db/test_setup.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pgtest

import (
dbpg "tdex-analytics/internal/infrastructure/db/pg"
dbpg "github.com/tdex-network/tdex-analytics/internal/infrastructure/db/pg"

"github.com/stretchr/testify/suite"
)
Expand Down

0 comments on commit 72c2597

Please sign in to comment.