mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
preparations for soft deprecation of legacy notification args (#1377)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
This commit is contained in:
parent
2102a056de
commit
cb555f539d
18 changed files with 505 additions and 167 deletions
|
|
@ -1,16 +1,17 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// ConvertibleNotifier is a notifier capable of creating a shoutrrr URL
|
||||
type ConvertibleNotifier interface {
|
||||
GetURL(c *cobra.Command, title string) (string, error)
|
||||
GetURL(c *cobra.Command) (string, error)
|
||||
}
|
||||
|
||||
// DelayNotifier is a notifier that might need to be delayed before sending notifications
|
||||
type DelayNotifier interface {
|
||||
GetDelay() time.Duration
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ package types
|
|||
type Notifier interface {
|
||||
StartNotification()
|
||||
SendNotification(Report)
|
||||
AddLogHook()
|
||||
GetNames() []string
|
||||
GetURLs() []string
|
||||
Close()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue