Documentation ¶
Index ¶
- func GenerateEventlogReportEmail(amount float32, balance float32, startDate time.Time, endDate time.Time, ...) (*bytes.Buffer, error)
- type EventsLogEmailFormat
- type Notification
- type PendingAssetsEmailFormat
- type Repository
- func (r *Repository) BulkDelete(filter bson.M) error
- func (r *Repository) BulkDeleteByApplicationID(id string) error
- func (r *Repository) Create(notification *domain.Notification) error
- func (r *Repository) FindLastEventLogsNotificationDate() (time.Time, error)
- func (r *Repository) Sent(id primitive.ObjectID) error
- type Service
- func (s *Service) BulkDeleteByApplicationID(id string) error
- func (n *Service) CreateEmailNotification(subject, message, notificationType string) error
- func (n *Service) FindLastEventLogsNotificationDate() (time.Time, error)
- func (n *Service) SendEmail(subject, body string) error
- func (a *Service) ShouldSendNotification() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventsLogEmailFormat ¶
type Notification ¶
type Notification domain.Notification
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(repo domain.Repository) *Repository
NewAssetsRepository returns an instance of OrdersRepository
func (*Repository) BulkDelete ¶
func (r *Repository) BulkDelete(filter bson.M) error
BulkDelete removes multiple notifications
func (*Repository) BulkDeleteByApplicationID ¶
func (r *Repository) BulkDeleteByApplicationID(id string) error
BulkDeleteByApplicationID deletes all notifications associated with an application id
func (*Repository) Create ¶
func (r *Repository) Create(notification *domain.Notification) error
Create inserts a new notification in collection
func (*Repository) FindLastEventLogsNotificationDate ¶
func (r *Repository) FindLastEventLogsNotificationDate() (time.Time, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( notificationsRepository domain.NotificationsRepository, options domain.NotificationOptions, sendMail domain.SendMail, appID primitive.ObjectID, ) *Service
func (*Service) BulkDeleteByApplicationID ¶
BulkDeleteByApplicationID deletes all notifications associated with an application id
func (*Service) CreateEmailNotification ¶
CreateEmailNotification stores notification in repository and send email to Receiver
func (*Service) FindLastEventLogsNotificationDate ¶
FindLastEventLogsNotificationDate returns last notification date
func (*Service) ShouldSendNotification ¶
ShouldSendNotification verifies wheter last notification was sent more than 12 hours ago
Click to show internal directories.
Click to hide internal directories.