mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
feat: add stdout and filesystem notification channels (#2925)
* 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>
This commit is contained in:
17
internal/notification/channels/channel.go
Normal file
17
internal/notification/channels/channel.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user