Documentation ¶
Index ¶
- Variables
- type CRDBPersistence
- type DelegatingNotification
- type DelegatingNotificator
- type Destination
- type EmailNotificator
- type Endpoint
- type InternalManager
- type InternalService
- type Notification
- type Notificator
- type OutstandingNotification
- type OutstandingService
- type Request
- type SMSNotificator
- type SlackNotificator
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchDestination = fmt.Errorf("no such destination exists")
Functions ¶
This section is empty.
Types ¶
type CRDBPersistence ¶
type CRDBPersistence struct {
// contains filtered or unexported fields
}
func NewCRDBPersistence ¶
func NewCRDBPersistence(pool *pgxpool.Pool) *CRDBPersistence
func (*CRDBPersistence) Get ¶
func (crdbp *CRDBPersistence) Get(ctx context.Context, notifUUID uuid.UUID, tx pgx.Tx) (*Notification, error)
func (*CRDBPersistence) GetPool ¶
func (crdbp *CRDBPersistence) GetPool() *pgxpool.Pool
func (*CRDBPersistence) InsertIfNotExists ¶
func (crdbp *CRDBPersistence) InsertIfNotExists(ctx context.Context, notification *Notification, tx pgx.Tx) (int64, error)
type DelegatingNotification ¶
type DelegatingNotification struct {
// contains filtered or unexported fields
}
type DelegatingNotificator ¶
type DelegatingNotificator struct {
Notificators []Notificator
}
func (*DelegatingNotificator) DelegateNotification ¶
func (dn *DelegatingNotificator) DelegateNotification(notification *DelegatingNotification) error
type EmailNotificator ¶
type EmailNotificator struct { }
func (*EmailNotificator) Destination ¶
func (sn *EmailNotificator) Destination() Destination
func (*EmailNotificator) Send ¶
func (en *EmailNotificator) Send(txt string) error
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func NewEndpoint(svc InternalManager) *Endpoint
func (*Endpoint) CreateNotification ¶
func (e *Endpoint) CreateNotification(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
type InternalManager ¶
type InternalService ¶
type InternalService struct {
// contains filtered or unexported fields
}
func NewInternalService ¶
func NewInternalService(outstandingNotificationsProducer *messaging.KafkaProducer, persistence *CRDBPersistence) (*InternalService, error)
func (*InternalService) PushNotificationInternal ¶
func (s *InternalService) PushNotificationInternal(n *Request) error
type Notification ¶
type Notificator ¶
type Notificator interface { Send(txt string) error Destination() Destination }
type OutstandingNotification ¶
type OutstandingService ¶
type OutstandingService struct {
// contains filtered or unexported fields
}
func NewOutstandingService ¶
func NewOutstandingService( bootstrapServers, outstandingGroupID, autoResetOffset, enableAutoCommit, outstandingNotificationsTopic string, persistence *CRDBPersistence, notificator *DelegatingNotificator, maxRoutines int) (*OutstandingService, error)
func (*OutstandingService) Stop ¶
func (ous *OutstandingService) Stop()
type SMSNotificator ¶
type SMSNotificator struct { }
func (*SMSNotificator) Destination ¶
func (sn *SMSNotificator) Destination() Destination
func (*SMSNotificator) Send ¶
func (smsn *SMSNotificator) Send(txt string) error
type SlackNotificator ¶
type SlackNotificator struct { }
func (*SlackNotificator) Destination ¶
func (sn *SlackNotificator) Destination() Destination
func (*SlackNotificator) Send ¶
func (sn *SlackNotificator) Send(txt string) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package notificationmocks is a generated GoMock package.
|
Package notificationmocks is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.