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

5
pkg/types/filter.go Normal file
View file

@ -0,0 +1,5 @@
package types
// A Filter is a prototype for a function that can be used to filter the
// results from a call to the ListContainers() method on the Client.
type Filter func(FilterableContainer) bool

View file

@ -0,0 +1,9 @@
package types
// A FilterableContainer is the interface which is used to filter
// containers.
type FilterableContainer interface {
Name() string
IsWatchtower() bool
Enabled() (bool, bool)
}

6
pkg/types/notifier.go Normal file
View file

@ -0,0 +1,6 @@
package types
type Notifier interface {
StartNotification()
SendNotification()
}