Documentation ¶
Index ¶
- Constants
- Variables
- func AppendLegacyUrls(urls []string, cmd *cobra.Command) ([]string, time.Duration)
- func GetDelay(c *cobra.Command, legacyDelay time.Duration) time.Duration
- func GetScheme(url string) string
- func GetTitle(hostname string, tag string) string
- func NewNotifier(c *cobra.Command) ty.Notifier
- type Data
- type StaticData
Constants ¶
const ColorHex = "#406170"
ColorHex is the default notification color used for services that support it (formatted as a CSS hex string)
const ColorInt = 0x406170
ColorInt is the default notification color used for services that support it (as an int value)
Variables ¶
var LocalLog = log.WithField("notify", "no")
LocalLog is a logrus logger that does not send entries as notifications
Functions ¶
func AppendLegacyUrls ¶
AppendLegacyUrls creates shoutrrr equivalent URLs from legacy notification flags
func GetDelay ¶
GetDelay returns the legacy delay if defined, otherwise the delay as set by args is returned
Types ¶
type Data ¶
type Data struct { StaticData Entries []*log.Entry Report t.Report }
Data is the notification template data model
func (Data) MarshalJSON ¶
MarshalJSON implements json.Marshaler
type StaticData ¶
StaticData is the part of the notification template data model set upon initialization
func GetTemplateData ¶
func GetTemplateData(c *cobra.Command) StaticData
GetTemplateData populates the static notification data from flags and environment