mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
refactor: extract types and pkgs to new files
This commit is contained in:
parent
4a92a03f31
commit
e109a7a6ce
15 changed files with 71 additions and 57 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue