mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
aa2a1848da
* feat: add filesystem and stdout notification channels * configure through env vars * compile * feat: add compact option for debug notification channels * fix channel mock generation * avoid sensitive information in error message Co-authored-by: Livio Amstutz <livio.a@gmail.com> * add review improvements Co-authored-by: Livio Amstutz <livio.a@gmail.com>
18 lines
338 B
Go
18 lines
338 B
Go
package channels
|
|
|
|
type Message interface {
|
|
GetContent() string
|
|
}
|
|
|
|
type NotificationChannel interface {
|
|
HandleMessage(message Message) error
|
|
}
|
|
|
|
var _ NotificationChannel = (HandleMessageFunc)(nil)
|
|
|
|
type HandleMessageFunc func(message Message) error
|
|
|
|
func (h HandleMessageFunc) HandleMessage(message Message) error {
|
|
return h(message)
|
|
}
|