Documentation
¶
Overview ¶
Mailroom is a notification relay framework
Index ¶
- type Opt
- func WithDefaultPreferences(prefs preference.Provider) Opt
- func WithListenAddr(addr string) Opt
- func WithParser(key string, parser event.Parser) Opt
- func WithParserAndGenerator(key string, parser event.Parser, generator event.Processor) Opt
- func WithProcessors(processors ...event.Processor) Opt
- func WithRouter(router *mux.Router) Opt
- func WithTransports(transports ...notifier.Transport) Opt
- func WithUserStore(us user.Store) Opt
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt func(s *Server)
func WithDefaultPreferences ¶ added in v0.4.0
func WithDefaultPreferences(prefs preference.Provider) Opt
WithDefaultPreferences sets the default preferences for the server
func WithListenAddr ¶
WithListenAddr sets the IP and port the server listens on, in the form "host:port"
func WithParser ¶ added in v0.4.0
WithParser adds an event.Parser to the server with the given key. The key is used as the API endpoint for the server.
func WithParserAndGenerator ¶ added in v0.4.0
WithParserAndGenerator is a convenience function that adds an event.Parser and its corresponding processor (which generates notifications) in a single call.
func WithProcessors ¶ added in v0.4.0
WithProcessors adds event.Processor instances to the server in the order given.
func WithRouter ¶
WithRouter sets the mux.Router used for the server
func WithTransports ¶
WithTransports adds notifier.Transport instances to the server
func WithUserStore ¶
WithUserStore sets the user.Store for the server
Directories
¶
| Path | Synopsis |
|---|---|
|
pkg
|
|
|
event
Package event provides types and functions for working with incoming events
|
Package event provides types and functions for working with incoming events |
|
identifier
Package identifier provides a way to identify users across different systems.
|
Package identifier provides a way to identify users across different systems. |
|
notifier
Package notifier encapsulates the concept of sending a common.Notification via some Transport
|
Package notifier encapsulates the concept of sending a common.Notification via some Transport |
|
notifier/slack
Package slack provides a notifier.Transport implementation for sending notifications to Slack
|
Package slack provides a notifier.Transport implementation for sending notifications to Slack |
|
server
Package server provides the HTTP server for incoming events
|
Package server provides the HTTP server for incoming events |
|
user
Package user provides types and functions for managing users who may want to receive notifications
|
Package user provides types and functions for managing users who may want to receive notifications |
|
user/postgres
Package postgres provides a postgresql-backed implementation of the user.Store interface
|
Package postgres provides a postgresql-backed implementation of the user.Store interface |

