Documentation
¶
Overview ¶
Package notify sends the update notifications of packages to the webhook of the notification settings (applications.update.notification); the package Reconciler decides when.
Index ¶
Constants ¶
const ( SubjectApplication = "Application" // SubjectApplication announces an update of an Application. SubjectModule = "Module" // SubjectModule announces an update of a Module. )
Subjects of a notification: what kind of package is updated.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
Auth authenticates the request: basic auth when Username is set, else a bearer Token when set.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier sends announcements to one webhook; it satisfies model.Notifier. Safe for concurrent use.
type Payload ¶
type Payload struct {
Subject string `json:"subject"`
Name string `json:"name"` // Name is the application or module name.
Namespace string `json:"namespace,omitempty"` // Namespace is the application's; empty for a module.
Version string `json:"version"`
ApplyTime string `json:"applyTime,omitempty"`
Message string `json:"message"`
}
Payload is the body of a notification.