Skip to content

Commit

Permalink
Merge pull request intel#63 from intel/app-sdk-3.1.0
Browse files Browse the repository at this point in the history
feat: Use App SDK 3.1.
  • Loading branch information
Lenny Goodell authored Dec 13, 2023
2 parents 5d31fbe + f69ea4a commit 7f848f9
Show file tree
Hide file tree
Showing 49 changed files with 343 additions and 353 deletions.
8 changes: 5 additions & 3 deletions as-file-receiver-oem/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
package config

import (
"aicsd/pkg/helpers"
"aicsd/pkg/wait"
"errors"
"fmt"
"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"os"

"aicsd/pkg/helpers"
"aicsd/pkg/wait"

"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
)

type Configuration struct {
Expand Down
17 changes: 9 additions & 8 deletions as-file-receiver-oem/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@
package controller

import (
"net/http"
"os"
"path/filepath"
"strconv"
"sync"

"aicsd/as-file-receiver-oem/clients/file_sender"
"aicsd/pkg"
"aicsd/pkg/clients/job_repo"
"aicsd/pkg/helpers"
"aicsd/pkg/types"
"aicsd/pkg/wait"
"aicsd/pkg/werrors"
"github.com/hashicorp/go-multierror"
"net/http"
"os"
"path/filepath"
"strconv"
"sync"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/hashicorp/go-multierror"
)

type Controller struct {
Expand Down
16 changes: 9 additions & 7 deletions as-file-receiver-oem/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@
package controller

import (
"errors"
"fmt"
"os"
"path/filepath"
"strconv"
"testing"

fileSenderMocks "aicsd/as-file-receiver-oem/clients/file_sender/mocks"
"aicsd/pkg"
jobRepoMocks "aicsd/pkg/clients/job_repo/mocks"
"aicsd/pkg/helpers"
"aicsd/pkg/types"
"aicsd/pkg/wait"
"errors"
"fmt"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"

"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/jinzhu/copier"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"os"
"path/filepath"
"strconv"
"testing"
)

const (
Expand Down
19 changes: 10 additions & 9 deletions as-file-receiver-oem/functions/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@
package functions

import (
"encoding/json"
"os"
"path/filepath"
"strconv"
"sync"

"aicsd/as-file-receiver-oem/clients/file_sender"
"aicsd/pkg"
"aicsd/pkg/clients/job_repo"
"aicsd/pkg/helpers"
"aicsd/pkg/types"
"aicsd/pkg/werrors"
"encoding/json"
"github.com/hashicorp/go-multierror"
"os"
"path/filepath"
"strconv"
"sync"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/dtos"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos"
"github.com/hashicorp/go-multierror"
)

// PipelineReceiver provides the data for the App Function Pipelines in this package
Expand Down
19 changes: 10 additions & 9 deletions as-file-receiver-oem/functions/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
package functions

import (
fileSenderMocks "aicsd/as-file-receiver-oem/clients/file_sender/mocks"
"aicsd/pkg"
jobRepoMocks "aicsd/pkg/clients/job_repo/mocks"
"aicsd/pkg/helpers"
"aicsd/pkg/types"
"os"
"path/filepath"
"strconv"
"strings"
"testing"

appsdk "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg"
"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/dtos"
fileSenderMocks "aicsd/as-file-receiver-oem/clients/file_sender/mocks"
"aicsd/pkg"
jobRepoMocks "aicsd/pkg/clients/job_repo/mocks"
"aicsd/pkg/helpers"
"aicsd/pkg/types"

appsdk "github.com/edgexfoundry/app-functions-sdk-go/v3/pkg"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
11 changes: 6 additions & 5 deletions as-file-receiver-oem/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
package main

import (
"fmt"
"os"

"aicsd/as-file-receiver-oem/clients/file_sender"
"aicsd/as-file-receiver-oem/config"
"aicsd/as-file-receiver-oem/controller"
Expand All @@ -14,10 +17,8 @@ import (
"aicsd/pkg/auth"
"aicsd/pkg/clients/job_repo"
"aicsd/pkg/wait"
"fmt"
"os"

appsdk "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg"
appsdk "github.com/edgexfoundry/app-functions-sdk-go/v3/pkg"
)

func main() {
Expand Down Expand Up @@ -74,8 +75,8 @@ func main() {
os.Exit(-1)
}

if err := service.MakeItRun(); err != nil {
lc.Errorf("MakeItRun returned error: %s", err.Error())
if err := service.Run(); err != nil {
lc.Errorf("Run returned error: %s", err.Error())
os.Exit(-1)
}

Expand Down
2 changes: 1 addition & 1 deletion as-file-sender-gateway/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"fmt"
"os"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"

"aicsd/pkg/helpers"
)
Expand Down
15 changes: 8 additions & 7 deletions as-file-sender-gateway/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
package controller

import (
"aicsd/ms-data-organizer/clients/task_launcher"
"aicsd/pkg/wait"
"aicsd/pkg/werrors"
"encoding/json"
"errors"
"fmt"
Expand All @@ -20,10 +17,14 @@ import (
"strings"
"time"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/common"
"github.com/edgexfoundry/go-mod-core-contracts/v2/dtos"
"aicsd/ms-data-organizer/clients/task_launcher"
"aicsd/pkg/wait"
"aicsd/pkg/werrors"

"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos"
"github.com/google/uuid"
"github.com/hashicorp/go-multierror"
"github.com/sunshineplan/imgconv"
Expand Down
10 changes: 5 additions & 5 deletions as-file-sender-gateway/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"strings"
"testing"

appsdk "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg"
"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces/mocks"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/common"
appsdk "github.com/edgexfoundry/app-functions-sdk-go/v3/pkg"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces/mocks"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
"github.com/google/uuid"
"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"
Expand Down
11 changes: 6 additions & 5 deletions as-file-sender-gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
package main

import (
"aicsd/ms-data-organizer/clients/task_launcher"
"aicsd/pkg/wait"
"fmt"
"os"

"aicsd/ms-data-organizer/clients/task_launcher"
"aicsd/pkg/wait"

"aicsd/as-file-sender-gateway/config"
"aicsd/as-file-sender-gateway/controller"
"aicsd/pkg"
"aicsd/pkg/clients/job_repo"

appsdk "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg"
appsdk "github.com/edgexfoundry/app-functions-sdk-go/v3/pkg"
)

func main() {
Expand Down Expand Up @@ -64,8 +65,8 @@ func main() {
lc.Errorf("failed to retry one or more jobs: %s", err.Error())
}

if err := service.MakeItRun(); err != nil {
lc.Errorf("MakeItRun returned error: %s", err.Error())
if err := service.Run(); err != nil {
lc.Errorf("Run returned error: %s", err.Error())
os.Exit(-1)
}

Expand Down
2 changes: 1 addition & 1 deletion as-pipeline-sim/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package config

import (
"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"

"aicsd/pkg/helpers"
)
Expand Down
9 changes: 5 additions & 4 deletions as-pipeline-sim/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
package controller

import (
"aicsd/pkg/helpers"
"aicsd/pkg/wait"
"encoding/json"
"io"
"net/http"
"os"
"path/filepath"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"aicsd/pkg/helpers"
"aicsd/pkg/wait"

"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/google/uuid"

"aicsd/pkg"
Expand Down
11 changes: 6 additions & 5 deletions as-pipeline-sim/functions/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
package functions

import (
"aicsd/as-pipeline-sim/config"
"aicsd/pkg/types"
"bytes"
"encoding/json"
"fmt"
Expand All @@ -18,11 +16,14 @@ import (
"path/filepath"
"strings"

"aicsd/as-pipeline-sim/config"
"aicsd/pkg/types"

"aicsd/pkg/helpers"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v2/dtos"
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos"

"aicsd/pkg"
"aicsd/pkg/werrors"
Expand Down
11 changes: 6 additions & 5 deletions as-pipeline-sim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
package main

import (
"aicsd/pkg"
"aicsd/pkg/wait"
"fmt"
"os"

appsdk "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg"
"aicsd/pkg"
"aicsd/pkg/wait"

appsdk "github.com/edgexfoundry/app-functions-sdk-go/v3/pkg"

"aicsd/as-pipeline-sim/config"
"aicsd/as-pipeline-sim/controller"
Expand Down Expand Up @@ -93,9 +94,9 @@ func main() {
os.Exit(-1)
}

err = service.MakeItRun()
err = service.Run()
if err != nil {
lc.Errorf("MakeItRun returned error: %s", err.Error())
lc.Errorf("Run returned error: %s", err.Error())
os.Exit(-1)
}

Expand Down
5 changes: 3 additions & 2 deletions as-pipeline-val/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
package config

import (
"aicsd/pkg/helpers"
"fmt"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"aicsd/pkg/helpers"

"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
)

type Configuration struct {
Expand Down
Loading

0 comments on commit 7f848f9

Please sign in to comment.