Skip to content

Commit

Permalink
refactor!: update module to v4
Browse files Browse the repository at this point in the history
BREAKING CHANGE: import paths will need to change to v4

Signed-off-by: Ginny Guan <[email protected]>
  • Loading branch information
jinlinGuan committed Oct 23, 2024
1 parent 1d521fa commit c98b13c
Show file tree
Hide file tree
Showing 49 changed files with 99 additions and 99 deletions.
16 changes: 8 additions & 8 deletions clients/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import (
"strconv"
"time"

"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common"
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses"
edgexErr "github.com/edgexfoundry/go-mod-core-contracts/v3/errors"

"github.com/edgexfoundry/go-mod-messaging/v3/messaging"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common"
"github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses"
edgexErr "github.com/edgexfoundry/go-mod-core-contracts/v4/errors"

"github.com/edgexfoundry/go-mod-messaging/v4/messaging"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

type CommandClient struct {
Expand Down
14 changes: 7 additions & 7 deletions clients/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ import (
"testing"
"time"

"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos"
commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common"
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses"
"github.com/edgexfoundry/go-mod-messaging/v3/messaging/mocks"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
"github.com/edgexfoundry/go-mod-core-contracts/v4/dtos"
commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common"
"github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses"
"github.com/edgexfoundry/go-mod-messaging/v4/messaging/mocks"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/edgexfoundry/go-mod-messaging/v3
module github.com/edgexfoundry/go-mod-messaging/v4

go 1.23

require (
github.com/eclipse/paho.mqtt.golang v1.5.0
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.1
github.com/go-redis/redis/v7 v7.3.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-multierror v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o=
github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53 h1:aHnYwqpg0LcnMrgNQlkRQjzHAS/IML/9GI368OmNCz4=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53/go.mod h1:MLk37/79M26+bZr3IptNZuYmQBEVbXwzDp1VHQkFhIk=
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.1 h1:nAKgq3FZNyCLUxus5j+4pT0vcmT1I5+4MJCUAaD8Pg8=
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.1/go.mod h1:I3EG+Tg/gcVSUJ+IJDuvVKFISnRu8oQtMXqltE1rzT8=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/mqtt/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"sync"
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"

pahoMqtt "github.com/eclipse/paho.mqtt.golang"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/mqtt/client_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import (
"testing"
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

// TestIntegrationWithMQTTServer end-to-end test of the MQTT client with a MQTT server.
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/mqtt/client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"strconv"
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

// MQTTClientConfig contains all the configurations for the MQTT client.
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/mqtt/client_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ package mqtt
import (
"testing"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

func TestCreateMQTTClientConfiguration(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/mqtt/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"

pahoMqtt "github.com/eclipse/paho.mqtt.golang"
"github.com/stretchr/testify/assert"
Expand Down
6 changes: 3 additions & 3 deletions internal/pkg/nats/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"sync"
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats/interfaces"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats/interfaces"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
"github.com/hashicorp/go-multierror"
"github.com/nats-io/nats.go"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/nats/client_no_nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package nats
import (
"fmt"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

// NewClient initializes creates a new client using NATS core
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/nats/client_no_nats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package nats
import (
"testing"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions internal/pkg/nats/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"testing"
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats/interfaces"
mocks2 "github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats/interfaces/mocks"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats/interfaces"
mocks2 "github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats/interfaces/mocks"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
"github.com/google/uuid"
"github.com/nats-io/nats.go"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/nats/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package nats

import (
"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats/interfaces"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats/interfaces"
)

// ConnectNats is a function that can be provided to determine the underlying connection for clients to use.
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/nats/interfaces/marshaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package interfaces

import (
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
"github.com/nats-io/nats.go"
)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions internal/pkg/nats/jetstream/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ package jetstream
import (
"strings"

natsMessaging "github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats"
"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats/interfaces"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
natsMessaging "github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats/interfaces"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
"github.com/nats-io/nats.go"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/nats/jetstream/client_no_nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package jetstream
import (
"fmt"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

// NewClient initializes creates a new client using NATS core
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/nats/jetstream/client_no_nats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package jetstream
import (
"testing"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/nats/jetstream/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package jetstream
import (
"strings"

natsMessaging "github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats"
natsMessaging "github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats"
"github.com/nats-io/nats.go"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/nats/jetstream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package jetstream
import (
"strings"

localnats "github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats"
localnats "github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/nats/marshaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/nats-io/nats.go"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

type jsonMarshaller struct {
Expand Down
8 changes: 4 additions & 4 deletions internal/pkg/nats/marshaller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ import (
"fmt"
"testing"

"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common"
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common"
"github.com/google/uuid"
"github.com/nats-io/nats.go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/nats/interfaces"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/nats/interfaces"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

var marshallerCases = map[string]interfaces.MarshallerUnmarshaller{
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/nats/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"os"
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
"github.com/nats-io/nats.go"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/nats/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import (
"fmt"
"testing"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

func TestCreateClientConfiguration(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/noopclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package pkg
import (
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

type NoopClient struct{}
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/redis/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"sync"
"time"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions internal/pkg/redis/client_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ import (
"testing"
"time"

"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/http"
commonConstants "github.com/edgexfoundry/go-mod-core-contracts/v3/common"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/http"
commonConstants "github.com/edgexfoundry/go-mod-core-contracts/v4/common"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions internal/pkg/redis/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
redisMocks "github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg/redis/mocks"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
redisMocks "github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg/redis/mocks"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

var HostInfo = types.HostInfo{
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/redis/configuration_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package redis

import (
"github.com/edgexfoundry/go-mod-messaging/v3/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/internal/pkg"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

// OptionalClientConfiguration contains additional configuration properties which can be provided via the
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/redis/configuration_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"
)

func TestNewClientConfiguration(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/redis/goredis.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"sync"

"github.com/edgexfoundry/go-mod-messaging/v3/pkg/types"
"github.com/edgexfoundry/go-mod-messaging/v4/pkg/types"

goRedis "github.com/go-redis/redis/v7"
)
Expand Down
Loading

0 comments on commit c98b13c

Please sign in to comment.