Skip to content

Commit

Permalink
refactor: Refactor import paths to consume V2 versions of edgex go-mo…
Browse files Browse the repository at this point in the history
…ds (#3055)

closes #3052

Signed-off-by: lenny <[email protected]>
  • Loading branch information
lenny-goodell authored Jan 20, 2021
1 parent b641f4f commit ba3f575
Show file tree
Hide file tree
Showing 390 changed files with 884 additions and 883 deletions.
10 changes: 5 additions & 5 deletions Attribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,22 @@ https://bitbucket.org/bertimus9/systemstat/src/master/LICENSE
davecgh/go-spew (ISC) https://github.com/davecgh/go-spew
https://github.com/davecgh/go-spew/blob/master/LICENSE

edgexfoundry/go-mod-bootstrap (Apache 2.0) https://github.com/edgexfoundry/go-mod-bootstrap
edgexfoundry/go-mod-bootstrap (Apache 2.0) https://github.com/edgexfoundry/go-mod-bootstrap/v2
https://github.com/edgexfoundry/go-mod-bootstrap/blob/master/LICENSE

edgexfoundry/go-mod-configuration (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration
edgexfoundry/go-mod-configuration (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration/v2
https://github.com/edgexfoundry/go-mod-configuration/blob/master/LICENSE

edgexfoundry/go-mod-core-contracts (Apache 2.0) https://github.com/edgexfoundry/go-mod-core-contracts
edgexfoundry/go-mod-core-contracts (Apache 2.0) https://github.com/edgexfoundry/go-mod-core-contracts/v2
https://github.com/edgexfoundry/go-mod-core-contracts/blob/master/LICENSE

edgexfoundry/go-mod-messaging (Apache 2.0) https://github.com/edgexfoundry/go-mod-messaging/v2
https://github.com/edgexfoundry/go-mod-messaging/blob/master/LICENSE

edgexfoundry/go-mod-registry (Apache 2.0) https://github.com/edgexfoundry/go-mod-registry
edgexfoundry/go-mod-registry (Apache 2.0) https://github.com/edgexfoundry/go-mod-registry/v2
https://github.com/edgexfoundry/go-mod-registry/blob/master/LICENSE

edgexfoundry/go-mod-secrets (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets
edgexfoundry/go-mod-secrets (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets/v2
https://github.com/edgexfoundry/go-mod-secrets/blob/master/LICENSE

gorilla/context (BSD-3) https://github.com/gorilla/context
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ require (
github.com/BurntSushi/toml v0.3.1
github.com/OneOfOne/xxhash v1.2.8
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/edgexfoundry/go-mod-bootstrap v0.0.72
github.com/edgexfoundry/go-mod-configuration v0.0.8
github.com/edgexfoundry/go-mod-core-contracts v0.1.149
github.com/edgexfoundry/go-mod-messaging/v2 v2.0.0
github.com/edgexfoundry/go-mod-registry v0.1.27
github.com/edgexfoundry/go-mod-secrets v0.0.33
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.0.0-dev.2
github.com/edgexfoundry/go-mod-configuration/v2 v2.0.0-dev.1
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.0.0-dev.1
github.com/edgexfoundry/go-mod-messaging/v2 v2.0.0-dev.1
github.com/edgexfoundry/go-mod-registry/v2 v2.0.0-dev.1
github.com/edgexfoundry/go-mod-secrets/v2 v2.0.0-dev.2
github.com/fxamacker/cbor/v2 v2.2.0
github.com/gomodule/redigo v2.0.0+incompatible
github.com/google/uuid v1.1.5
Expand Down
2 changes: 1 addition & 1 deletion internal/core/command/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package config

import (
bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/config"
bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v2/config"
)

// ConfigurationStruct contains the configuration properties for the core-command service.
Expand Down
2 changes: 1 addition & 1 deletion internal/core/command/container/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package container
import (
"github.com/edgexfoundry/edgex-go/internal/core/command/config"

"github.com/edgexfoundry/go-mod-bootstrap/di"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"
)

// ConfigurationName contains the name of command's config.ConfigurationStruct implementation in the DIC.
Expand Down
4 changes: 2 additions & 2 deletions internal/core/command/container/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package container

import (
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"

"github.com/edgexfoundry/go-mod-bootstrap/di"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"
)

// MetadataDeviceClientName contains the name of the client implementation in the DIC.
Expand Down
6 changes: 3 additions & 3 deletions internal/core/command/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"github.com/edgexfoundry/edgex-go/internal/core/command/errors"
"github.com/edgexfoundry/edgex-go/internal/core/command/interfaces"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"

"github.com/gorilla/mux"
)
Expand Down
8 changes: 4 additions & 4 deletions internal/core/command/device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
mdMocks "github.com/edgexfoundry/edgex-go/internal/mocks"
"github.com/edgexfoundry/edgex-go/internal/pkg/db"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/clients/types"
"github.com/edgexfoundry/go-mod-core-contracts/models"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/types"
"github.com/edgexfoundry/go-mod-core-contracts/v2/models"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"

"github.com/gorilla/mux"
"github.com/stretchr/testify/mock"
Expand Down
4 changes: 2 additions & 2 deletions internal/core/command/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/edgexfoundry/edgex-go/internal"
"github.com/edgexfoundry/edgex-go/internal/core/command/errors"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
)

// NewGetCommand creates and Executor which can be used to execute the GET related command.
Expand Down
6 changes: 3 additions & 3 deletions internal/core/command/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"strconv"
"testing"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions internal/core/command/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ import (
"context"
"sync"

"github.com/edgexfoundry/go-mod-core-contracts/clients/urlclient/local"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/urlclient/local"

bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/bootstrap/container"
"github.com/edgexfoundry/go-mod-bootstrap/bootstrap/startup"
"github.com/edgexfoundry/go-mod-bootstrap/di"
bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/container"
"github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"

"github.com/edgexfoundry/edgex-go/internal/core/command/container"
errorContainer "github.com/edgexfoundry/edgex-go/internal/pkg/container"
"github.com/edgexfoundry/edgex-go/internal/pkg/errorconcept"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"
"github.com/gorilla/mux"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/core/command/interfaces/db.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package interfaces

import (
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
)

type DBClient interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/core/command/interfaces/mocks/DBClient.go

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

14 changes: 7 additions & 7 deletions internal/core/command/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (
"github.com/edgexfoundry/edgex-go/internal/pkg/bootstrap/handlers/database"
"github.com/edgexfoundry/edgex-go/internal/pkg/telemetry"

"github.com/edgexfoundry/go-mod-bootstrap/bootstrap"
"github.com/edgexfoundry/go-mod-bootstrap/bootstrap/flags"
"github.com/edgexfoundry/go-mod-bootstrap/bootstrap/handlers"
"github.com/edgexfoundry/go-mod-bootstrap/bootstrap/interfaces"
"github.com/edgexfoundry/go-mod-bootstrap/bootstrap/startup"
"github.com/edgexfoundry/go-mod-bootstrap/di"
"github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap"
"github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/flags"
"github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/handlers"
"github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/interfaces"
"github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"

"github.com/gorilla/mux"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/core/command/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/edgexfoundry/edgex-go/internal"
"github.com/edgexfoundry/edgex-go/internal/core/command/errors"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
)

// NewPutCommand creates and Executor which can be used to execute the PUT related command.
Expand Down
4 changes: 2 additions & 2 deletions internal/core/command/put_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"reflect"
"testing"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
)

func TestNewPutCommandWithCorrelationId(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions internal/core/command/restDevice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import (
"github.com/edgexfoundry/edgex-go/internal/pkg/db"
"github.com/edgexfoundry/edgex-go/internal/pkg/errorconcept"

bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/config"
bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v2/config"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/models"

"github.com/gorilla/mux"
"github.com/stretchr/testify/mock"
Expand Down
6 changes: 3 additions & 3 deletions internal/core/command/rest_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"github.com/edgexfoundry/edgex-go/internal/core/command/interfaces"
"github.com/edgexfoundry/edgex-go/internal/pkg/errorconcept"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"

"github.com/gorilla/mux"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/core/command/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"github.com/edgexfoundry/edgex-go/internal/pkg/correlation"
"github.com/edgexfoundry/edgex-go/internal/pkg/telemetry"

bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/bootstrap/container"
"github.com/edgexfoundry/go-mod-bootstrap/di"
bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/container"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"

"github.com/gorilla/mux"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/core/command/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (

"github.com/edgexfoundry/edgex-go/internal"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
)

// serviceCommand type which encapsulates command information to be sent to the command service.
Expand Down
4 changes: 2 additions & 2 deletions internal/core/command/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"net/http/httptest"
"testing"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
)

// FailingMockHttpCaller a HttpCaller which always returns an error when executing a request.
Expand Down
2 changes: 1 addition & 1 deletion internal/core/command/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/edgexfoundry/edgex-go/internal/core/command/errors"
"net/http"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"
)

// propagatedHeader is a slice containing request headers that we want to propagate. It is
Expand Down
2 changes: 1 addition & 1 deletion internal/core/data/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package config
import (
"fmt"

bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/config"
bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v2/config"
)

type ConfigurationStruct struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/core/data/container/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package container
import (
"github.com/edgexfoundry/edgex-go/internal/core/data/config"

"github.com/edgexfoundry/go-mod-bootstrap/di"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"
)

// ConfigurationName contains the name of data's config.ConfigurationStruct implementation in the DIC.
Expand Down
2 changes: 1 addition & 1 deletion internal/core/data/container/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package container

import "github.com/edgexfoundry/go-mod-bootstrap/di"
import "github.com/edgexfoundry/go-mod-bootstrap/v2/di"

// EventsChannelName contains the name of the Events channel instance in the DIC.
const EventsChannelName = "CoreDataEventsChannel"
Expand Down
2 changes: 1 addition & 1 deletion internal/core/data/container/messaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package container

import (
"github.com/edgexfoundry/go-mod-bootstrap/di"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"
"github.com/edgexfoundry/go-mod-messaging/v2/messaging"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/core/data/container/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package container

import (
"github.com/edgexfoundry/go-mod-bootstrap/di"
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"
)

// MetadataDeviceClientName contains the name of the Metadata device client instance in the DIC.
Expand Down
4 changes: 2 additions & 2 deletions internal/core/data/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"github.com/edgexfoundry/edgex-go/internal/core/data/config"
"github.com/edgexfoundry/edgex-go/internal/pkg/db"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"
)

// Update when the device was last reported connected
Expand Down
4 changes: 2 additions & 2 deletions internal/core/data/device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/edgexfoundry/edgex-go/internal/pkg/db"
"github.com/google/uuid"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
)

var testEvent contract.Event
Expand Down
4 changes: 2 additions & 2 deletions internal/core/data/domain_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package data
import (
"github.com/edgexfoundry/edgex-go/internal/core/data/config"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"
)

// An event indicating that a given device has just reported some data
Expand Down
8 changes: 4 additions & 4 deletions internal/core/data/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"github.com/edgexfoundry/edgex-go/internal/pkg/correlation/models"
"github.com/edgexfoundry/edgex-go/internal/pkg/db"

"github.com/edgexfoundry/go-mod-core-contracts/clients"
"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/clients/metadata"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/metadata"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
"github.com/edgexfoundry/go-mod-messaging/v2/messaging"
msgTypes "github.com/edgexfoundry/go-mod-messaging/v2/pkg/types"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/core/data/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
correlation "github.com/edgexfoundry/edgex-go/internal/pkg/correlation/models"
"github.com/edgexfoundry/edgex-go/internal/pkg/db"

"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/models"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
contract "github.com/edgexfoundry/go-mod-core-contracts/v2/models"
"github.com/edgexfoundry/go-mod-messaging/v2/messaging"
msgTypes "github.com/edgexfoundry/go-mod-messaging/v2/pkg/types"

Expand Down
Loading

0 comments on commit ba3f575

Please sign in to comment.