mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +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
5
pkg/types/filter.go
Normal file
5
pkg/types/filter.go
Normal 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
|
||||
9
pkg/types/filterable_container.go
Normal file
9
pkg/types/filterable_container.go
Normal 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
6
pkg/types/notifier.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package types
|
||||
|
||||
type Notifier interface {
|
||||
StartNotification()
|
||||
SendNotification()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue