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:
@@ -2,6 +2,7 @@ package stack
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/portainer/portainer/api/database"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -17,7 +18,7 @@ const (
|
||||
|
||||
// Service represents a service for managing environment(endpoint) data.
|
||||
type Service struct {
|
||||
connection portainer.Connection
|
||||
connection database.Connection
|
||||
}
|
||||
|
||||
func (service *Service) BucketName() string {
|
||||
@@ -25,7 +26,7 @@ func (service *Service) BucketName() string {
|
||||
}
|
||||
|
||||
// NewService creates a new instance of a service.
|
||||
func NewService(connection portainer.Connection) (*Service, error) {
|
||||
func NewService(connection database.Connection) (*Service, error) {
|
||||
err := connection.SetServiceName(BucketName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user