preparations for soft deprecation of legacy notification args (#1377)

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
This commit is contained in:
nils måsén 2022-11-01 00:00:00 +01:00 committed by GitHub
parent 2102a056de
commit cb555f539d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 505 additions and 167 deletions

View file

@ -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
}
}

View file

@ -4,6 +4,8 @@ package types
type Notifier interface {
StartNotification()
SendNotification(Report)
AddLogHook()
GetNames() []string
GetURLs() []string
Close()
}