Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultSendTimeout = 15 * time.Second
Variables ¶
This section is empty.
Functions ¶
func BuildURL ¶
func BuildURL(input DestinationInput) (string, error)
func ConfigureHTTPClient ¶ added in v0.30.0
ConfigureHTTPClient installs the bounded client used by Shoutrrr's HTTP services. Redirects are checked again so a public endpoint cannot redirect a notification into a private network.
func RedactError ¶ added in v0.23.0
RedactError removes service URLs and common credential query parameters from provider errors before they are persisted or shown in the admin audit. The underlying error remains available to the caller for retry decisions, but destination credentials never become application-log or database content.
Types ¶
type DestinationInput ¶
type NotificationSender ¶
type ShoutrrrSender ¶
type ShoutrrrSender struct {
// AllowPrivateTargets is an explicit opt-in for self-hosted notification
// services on a trusted LAN. It is disabled by default to keep a member
// supplied destination from turning the application into an SSRF proxy.
AllowPrivateTargets bool
// SendTimeout bounds HTTP-based notification providers. Shoutrrr uses the
// process-wide net/http client for several services, so this timeout also
// protects those providers from hanging forever.
SendTimeout time.Duration
// contains filtered or unexported fields
}
func (ShoutrrrSender) Send ¶
func (s ShoutrrrSender) Send(ctx context.Context, serviceURL, title, body string) error
func (ShoutrrrSender) Validate ¶
func (s ShoutrrrSender) Validate(serviceURL string) error
Click to show internal directories.
Click to hide internal directories.