Refactor kafka to pure Go (franz-go), fix DBC stubs, update Dockerfile

This commit is contained in:
Chris Rai
2026-01-31 00:05:47 -05:00
parent fbb820d7b3
commit b5bec57dfa
776 changed files with 18945 additions and 2052 deletions

View File

@@ -3,7 +3,7 @@ package actionlogger
import (
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/google/uuid"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type APIToken struct {

View File

@@ -1,6 +1,6 @@
package authproviders
import "fiskerinc.com/modules/utils/envtool"
import "github.com/fiskerinc/cloud-services/pkg/utils/envtool"
const (
Default = "Default" // This is for any provider

View File

@@ -4,8 +4,8 @@ import (
"encoding/json"
"testing"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
)
type testHexBinary struct {

View File

@@ -3,7 +3,7 @@ package common
import (
"time"
"fiskerinc.com/modules/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
)
// CANFrame provides struct for can bus messages

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
const (

View File

@@ -3,7 +3,7 @@ package common
import (
"encoding/json"
"fiskerinc.com/modules/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
"github.com/pkg/errors"
)

View File

@@ -5,7 +5,7 @@ import (
"encoding/hex"
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type CarECU struct {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type CarSetting struct {

View File

@@ -2,7 +2,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
// CarUpdate schema

View File

@@ -3,8 +3,8 @@ package common_test
import (
"testing"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
)
func TestCarUpdateProgressCombine(t *testing.T) {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
// CarUpdateStatus database model for logging history of car updates

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
// CertificateRequest schema

View File

@@ -4,7 +4,7 @@ import (
"testing"
"time"
"fiskerinc.com/modules/common"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/stretchr/testify/assert"
)

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type Configuration struct {

View File

@@ -5,8 +5,8 @@ import (
"log"
"time"
"fiskerinc.com/modules/grpc/kafka_grpc"
"fiskerinc.com/modules/logger"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/logger"
"github.com/google/uuid"
)

View File

@@ -3,8 +3,8 @@ package common
import (
"encoding/json"
"fiskerinc.com/modules/grpc/kafka_grpc"
"fiskerinc.com/modules/logger"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/logger"
)
func DepotRouteTRexToGRPC(input MessageRawJSON) *kafka_grpc.GRPC_DepotPayload {

View File

@@ -5,8 +5,8 @@ import (
"testing"
"time"
"fiskerinc.com/modules/grpc/kafka_grpc"
"fiskerinc.com/modules/utils/elptr"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/utils/elptr"
)
func TestDepotRouteHMIPayload(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
can "github.com/Fisker-Inc/project-ai-can-go/pkg/descriptor"
can "github.com/fiskerinc/cloud-services/pkg/can-go/pkg/descriptor"
)
// SignalDesc is copied from project-ai-can-go and modified for local needs.

View File

@@ -3,8 +3,8 @@ package common_test
import (
"testing"
"fiskerinc.com/modules/common"
"github.com/Fisker-Inc/project-ai-can-go/pkg/descriptor"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/can-go/pkg/descriptor"
"github.com/stretchr/testify/assert"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
// DriverAccount model

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type ECCKeys struct {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type AddDTCRequest struct {

View File

@@ -3,8 +3,8 @@ package common
import (
"strings"
"fiskerinc.com/modules/utils/envtool"
"fiskerinc.com/modules/utils/whereami"
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
"github.com/fiskerinc/cloud-services/pkg/utils/whereami"
)
var EcuMap = map[string]string{

View File

@@ -3,7 +3,7 @@ package common
import (
b64 "encoding/base64"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type FileKey struct {

View File

@@ -4,10 +4,10 @@ import (
"testing"
"time"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/common/dbbasemodel"
"fiskerinc.com/modules/common/handlers"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/handlers"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
)
func TestHMIRXMessages(t *testing.T) {

View File

@@ -4,9 +4,9 @@ import (
"testing"
"time"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/common/dbbasemodel"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
)
func TestHMITXMessages(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"sync"
"time"
"fiskerinc.com/modules/utils/envtool"
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
)
var fpParams FingerprintParamer

View File

@@ -4,9 +4,9 @@ import (
"testing"
"time"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/common/dbbasemodel"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
"github.com/google/uuid"
)

View File

@@ -4,11 +4,11 @@ import (
"testing"
"time"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/common/dbbasemodel"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
"github.com/google/uuid"
"fiskerinc.com/modules/utils/elptr"
"github.com/fiskerinc/cloud-services/pkg/utils/elptr"
)
func TestMobileTXMessages(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"encoding/xml"
"time"
"fiskerinc.com/modules/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
)
type OrderUpdated struct {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type Product struct {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type RatePlanTMobile struct {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type SignedImage struct {

View File

@@ -3,7 +3,7 @@ package common
import (
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/google/uuid"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/google/uuid"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/google/uuid"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/google/uuid"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/google/uuid"
)

View File

@@ -5,7 +5,7 @@ import (
"strings"
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type SupplierAccount struct {

View File

@@ -4,9 +4,9 @@ import (
"testing"
"time"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/common/dbbasemodel"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
)
func TestSupplierAccount(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type SupplierOrganization struct {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type SupplierSigningCert struct {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type SwVersionRxSwin struct {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type SymKeys struct {

View File

@@ -3,8 +3,8 @@ package tests
import (
"testing"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/validator"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/validator"
)
func TestCANBusValidator(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"strings"
"fiskerinc.com/modules/logger"
"github.com/fiskerinc/cloud-services/pkg/logger"
"github.com/go-playground/validator/v10"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"

View File

@@ -3,7 +3,7 @@ package common
import (
"testing"
"reflect"
"fiskerinc.com/modules/logger"
"github.com/fiskerinc/cloud-services/pkg/logger"
)
func TestStringToTrexLogLevel(t *testing.T){

View File

@@ -3,7 +3,7 @@ package common
import (
"encoding/json"
"fiskerinc.com/modules/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
"github.com/pkg/errors"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"encoding/json"
"fiskerinc.com/modules/grpc/kafka_grpc"
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
"github.com/pkg/errors"
)

View File

@@ -3,10 +3,10 @@ package common_test
import (
"testing"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/common/handlers"
"fiskerinc.com/modules/testhelper"
"fiskerinc.com/modules/utils/elptr"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/common/handlers"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
"github.com/fiskerinc/cloud-services/pkg/utils/elptr"
)
func TestTRexRXMessages(t *testing.T) {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type TRexSetting struct {

View File

@@ -3,9 +3,9 @@ package common_test
import (
"testing"
"fiskerinc.com/modules/common"
s "fiskerinc.com/modules/common/carupdatestatus"
"fiskerinc.com/modules/testhelper"
"github.com/fiskerinc/cloud-services/pkg/common"
s "github.com/fiskerinc/cloud-services/pkg/common/carupdatestatus"
"github.com/fiskerinc/cloud-services/pkg/testhelper"
)
func TestTRexTXMessages(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package common
import (
"fmt"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type SUMSVersion struct {

View File

@@ -9,12 +9,12 @@ import (
"strings"
"time"
v "fiskerinc.com/modules/utils/vod"
"fiskerinc.com/modules/vindecoder"
"fiskerinc.com/modules/vod_decoder"
v "github.com/fiskerinc/cloud-services/pkg/utils/vod"
"github.com/fiskerinc/cloud-services/pkg/vindecoder"
"github.com/fiskerinc/cloud-services/pkg/vod_decoder"
"fiskerinc.com/modules/common/dbbasemodel"
"fiskerinc.com/modules/utils/envtool"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
"github.com/albenik/bcd"
"github.com/jinzhu/copier"
"github.com/pkg/errors"

View File

@@ -7,8 +7,8 @@ import (
"strconv"
"github.com/pkg/errors"
"fiskerinc.com/modules/common/dbbasemodel"
"fiskerinc.com/modules/vindecoder"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/vindecoder"
)
// Any changes need to be made to modules_go/db/queries/updatemanifests.go ECURollback() on getRollbacksOld

View File

@@ -3,7 +3,7 @@ package common
import (
"testing"
"fiskerinc.com/modules/utils/elptr"
"github.com/fiskerinc/cloud-services/pkg/utils/elptr"
)
func TestRemoveParsedS19HexFiles(t *testing.T) {

View File

@@ -1,7 +1,7 @@
package common
import (
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)
type ManifestFileType string

View File

@@ -8,11 +8,11 @@ import (
"testing"
"time"
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/common/dbbasemodel"
th "fiskerinc.com/modules/testhelper"
v "fiskerinc.com/modules/utils/vod"
"fiskerinc.com/modules/utils/elptr"
"github.com/fiskerinc/cloud-services/pkg/common"
"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
th "github.com/fiskerinc/cloud-services/pkg/testhelper"
v "github.com/fiskerinc/cloud-services/pkg/utils/vod"
"github.com/fiskerinc/cloud-services/pkg/utils/elptr"
)
func TestUpdatePackageManifest(t *testing.T) {