Documentation ¶
Overview ¶
The notifier package
This is the interface a plugin has to implement to be usable by this project as notification provider. The plugin has to expose an already initialized symbol called Provider that implements the Notifier interface here defined.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationEvent ¶
type NotificationEvent int
const ( NotifyAccountCreated NotificationEvent = iota NotifyAccountUpdated NotifyAccountRemoved )
func (NotificationEvent) MarshalJSON ¶
func (n NotificationEvent) MarshalJSON() ([]byte, error)
func (NotificationEvent) String ¶
func (n NotificationEvent) String() string
type Notifier ¶
type Notifier interface { // Init has to be invoked before the Notifier becomes available to send notifications. Init(ctx context.Context) error // Notify is the method to invoke in order to send notifications. It might either // be blocking, for reliable notifications, or non blocking, for fire-and-forget // notifications. Notify(ctx context.Context, event NotificationEvent, metadata map[string]string) error }
Click to show internal directories.
Click to hide internal directories.