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 ¶ added in v1.4.0
AppendLegacyUrls creates shoutrrr equivalent URLs from legacy notification flags
func GetDelay ¶ added in v1.5.0
GetDelay returns the legacy delay if defined, otherwise the delay as set by args is returned
Types ¶
type Data ¶ added in v1.4.0
type Data struct { StaticData Entries []*log.Entry Report t.Report }
Data is the notification template data model
func (Data) MarshalJSON ¶ added in v1.5.2
MarshalJSON implements json.Marshaler
type StaticData ¶ added in v1.5.0
StaticData is the part of the notification template data model set upon initialization
func GetTemplateData ¶ added in v1.5.0
func GetTemplateData(c *cobra.Command) StaticData
GetTemplateData populates the static notification data from flags and environment