feat(notifications): support delayed sending (#1142)

This commit is contained in:
nils måsén 2022-01-05 09:31:01 +01:00 committed by GitHub
parent 2fa8a2ad0c
commit 1d59fb83dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 13 deletions

View file

@ -1,8 +1,16 @@
package types
import "github.com/spf13/cobra"
import (
"github.com/spf13/cobra"
"time"
)
// ConvertibleNotifier is a notifier capable of creating a shoutrrr URL
type ConvertibleNotifier interface {
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
}