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

[PRO-1892] call valuations api grpc endpoints #192

Merged
merged 4 commits into from
Aug 30, 2023
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
1 change: 1 addition & 0 deletions charts/devices-api/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ env:
EVENTS_TOPIC: topic.event
DEVICE_DATA_INDEX_NAME: device-status-prod*
USERS_API_GRPC_ADDR: users-api-prod:8086
VALUATIONS_GRPC_ADDR: valuations-api-prod:8086
AWS_DOCUMENTS_BUCKET_NAME: dimo-network-documents-prod
DIMO_REGISTRY_CHAIN_ID: 137
NFT_S3_BUCKET: dimo-network-nfts-prod
Expand Down
1 change: 1 addition & 0 deletions charts/devices-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ env:
AWS_DOCUMENTS_BUCKET_NAME: dimo-network-documents-dev
NFT_S3_BUCKET: dimo-network-nfts-dev
USERS_API_GRPC_ADDR: users-api-dev:8086
VALUATIONS_GRPC_ADDR: valuations-api-dev:8086
DIMO_REGISTRY_CHAIN_ID: 80001
IPFS_NODE_ENDPOINT: http://cluster-ipfs-cluster.web3.svc.cluster.local:9094
DRIVLY_VIN_API_URL: https://vin.dev.driv.ly
Expand Down
3 changes: 2 additions & 1 deletion cmd/devices-api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func startWebAPI(logger zerolog.Logger, settings *config.Settings, pdb db.Store,
teslaTaskService := services.NewTeslaTaskService(settings, producer)
teslaSvc := services.NewTeslaService(settings)
autoPiSvc := services.NewAutoPiAPIService(settings, pdb.DBS)
valuationsSvc := services.NewValuationsAPIService(settings, &logger)
autoPiIngest := services.NewIngestRegistrar(producer)
deviceDefinitionRegistrar := services.NewDeviceDefinitionRegistrar(producer, settings)
autoPiTaskService := services.NewAutoPiTaskService(settings, autoPiSvc, pdb.DBS, logger)
Expand Down Expand Up @@ -130,7 +131,7 @@ func startWebAPI(logger zerolog.Logger, settings *config.Settings, pdb db.Store,
}

// controllers
userDeviceController := controllers.NewUserDevicesController(settings, pdb.DBS, &logger, ddSvc, ddIntSvc, eventService, smartcarClient, scTaskSvc, teslaSvc, teslaTaskService, cipher, autoPiSvc, services.NewNHTSAService(), autoPiIngest, deviceDefinitionRegistrar, autoPiTaskService, producer, s3NFTServiceClient, autoPi, redisCache, openAI, usersClient, ddaSvc, natsSvc, wallet)
userDeviceController := controllers.NewUserDevicesController(settings, pdb.DBS, &logger, ddSvc, ddIntSvc, eventService, smartcarClient, scTaskSvc, teslaSvc, teslaTaskService, cipher, autoPiSvc, services.NewNHTSAService(), autoPiIngest, deviceDefinitionRegistrar, autoPiTaskService, producer, s3NFTServiceClient, autoPi, redisCache, openAI, usersClient, ddaSvc, natsSvc, wallet, valuationsSvc)
geofenceController := controllers.NewGeofencesController(settings, pdb.DBS, &logger, producer, ddSvc)
webhooksController := controllers.NewWebhooksController(settings, pdb.DBS, &logger, autoPiSvc, ddIntSvc)
documentsController := controllers.NewDocumentsController(settings, &logger, s3ServiceClient, pdb.DBS)
Expand Down
1 change: 1 addition & 0 deletions cmd/devices-api/populate_powertrain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"flag"

"github.com/DIMO-Network/devices-api/internal/constants"

"github.com/google/subcommands"
Expand Down
27 changes: 13 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/DIMO-Network/go-mnemonic v0.0.0-20230406181942-6ddfe6f8c21c
github.com/DIMO-Network/shared v0.10.2
github.com/DIMO-Network/synthetic-wallet-instance v0.0.0-20230601233541-6a4c8afb27d3
github.com/DIMO-Network/valuations-api v0.2.0
github.com/DIMO-Network/zflogger v1.0.0-beta
github.com/Shopify/sarama v1.38.1
github.com/ThreeDotsLabs/watermill v1.1.1
Expand All @@ -22,7 +23,7 @@ require (
github.com/elastic/go-elasticsearch/v8 v8.6.0
github.com/friendsofgo/errors v0.9.2
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/gofiber/fiber/v2 v2.47.0
github.com/gofiber/fiber/v2 v2.48.0
github.com/golang-jwt/jwt/v5 v5.0.0
github.com/golang/mock v1.6.0
github.com/google/subcommands v1.2.0
Expand All @@ -47,7 +48,7 @@ require (
github.com/volatiletech/sqlboiler/v4 v4.14.2
github.com/volatiletech/strmangle v0.0.4
go.uber.org/automaxprocs v1.5.1
golang.org/x/mod v0.10.0
golang.org/x/mod v0.12.0
)

require (
Expand All @@ -69,7 +70,7 @@ require (
github.com/lovoo/goka v1.1.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/moby/patternmatcher v0.5.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
Expand All @@ -80,16 +81,14 @@ require (
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/swaggo/files/v2 v2.0.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
Expand Down Expand Up @@ -163,7 +162,7 @@ require (
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
google.golang.org/grpc v1.57.0
google.golang.org/protobuf v1.30.0
)
Expand All @@ -174,32 +173,32 @@ require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ethereum/go-ethereum v1.12.0
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gofiber/contrib/jwt v1.0.2
github.com/gofiber/swagger v0.1.12
github.com/gofrs/uuid v4.3.0+incompatible // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/smartcar/go-sdk v1.4.0
github.com/spf13/cast v1.5.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.47.0 // indirect
github.com/valyala/fasthttp v1.48.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
github.com/volatiletech/inflect v0.0.1 // indirect
github.com/volatiletech/randomize v0.0.1 // indirect
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
golang.org/x/net v0.10.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/tools v0.12.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
)

Expand Down
Loading
Loading