refactor: extract types and pkgs to new files

This commit is contained in:
Simon Aronsson 2019-07-21 19:58:19 +02:00
parent 4a92a03f31
commit e109a7a6ce
15 changed files with 71 additions and 57 deletions

View file

@ -10,6 +10,7 @@ import (
"github.com/containrrr/watchtower/container/mocks"
"github.com/docker/docker/api/types"
t "github.com/containrrr/watchtower/pkg/types"
cli "github.com/docker/docker/client"
. "github.com/onsi/ginkgo"
@ -149,7 +150,7 @@ type TestData struct {
Containers []container.Container
}
func (client mockClient) ListContainers(f container.Filter) ([]container.Container, error) {
func (client mockClient) ListContainers(f t.Filter) ([]container.Container, error) {
return client.TestData.Containers, nil
}

View file

@ -5,6 +5,7 @@ import (
"time"
"github.com/containrrr/watchtower/container"
t "github.com/containrrr/watchtower/pkg/types"
log "github.com/sirupsen/logrus"
)
@ -14,7 +15,7 @@ var (
// UpdateParams contains all different options available to alter the behavior of the Update func
type UpdateParams struct {
Filter container.Filter
Filter t.Filter
Cleanup bool
NoRestart bool
Timeout time.Duration