move Connection interface to api/database, and edgejob type definitions to api/dataservices/edgejobs to reduce the number of deps on portainer., and make deps on specific structures more obvious

Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io>
This commit is contained in:
Sven Dowideit
2022-02-23 15:57:06 +10:00
parent cdef48eb8e
commit 1598ec47ff
132 changed files with 565 additions and 434 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package webhooks
import (
"context"
"errors"
"github.com/portainer/portainer/api/database"
"github.com/portainer/portainer/api/internal/registryutils"
"io"
"net/http"
@@ -45,7 +46,7 @@ func (handler *Handler) webhookExecute(w http.ResponseWriter, r *http.Request) *
registryID := webhook.RegistryID
webhookType := webhook.WebhookType
endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID))
endpoint, err := handler.DataStore.Endpoint().Endpoint(database.EndpointID(endpointID))
if handler.DataStore.IsErrObjectNotFound(err) {
return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err}
} else if err != nil {