Documentation
¶
Index ¶
- type NotificationAction
- type NotificationPayload
- type Service
- func (s *Service) SendBPReminderNotification(ctx context.Context, userID int64, enhanced bool) error
- func (s *Service) SendEarlyIntakeConfirmation(ctx context.Context, userID int64, meds []store.Medication, ...) error
- func (s *Service) SendLowStockNotification(ctx context.Context, userID int64, meds []store.Medication) error
- func (s *Service) SendMedicationNotification(ctx context.Context, userID int64, meds []store.Medication, ...) error
- func (s *Service) SendWeightReminderNotification(ctx context.Context, userID int64) error
- func (s *Service) SendWorkoutNotification(ctx context.Context, userID int64, session *store.WorkoutSession, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationAction ¶
type NotificationPayload ¶
type NotificationPayload struct {
Title string `json:"title"`
Body string `json:"body"`
Icon string `json:"icon,omitempty"`
Badge string `json:"badge,omitempty"`
Tag string `json:"tag,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
Actions []NotificationAction `json:"actions,omitempty"`
}
NotificationPayload matches the structure expected by the SW
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) SendBPReminderNotification ¶
func (*Service) SendEarlyIntakeConfirmation ¶
func (s *Service) SendEarlyIntakeConfirmation(ctx context.Context, userID int64, meds []store.Medication, scheduledTime, takenTime time.Time, intakeIDs []int64) error
SendEarlyIntakeConfirmation sends a confirmation notification when user takes medication early
func (*Service) SendLowStockNotification ¶
func (*Service) SendMedicationNotification ¶
func (*Service) SendWeightReminderNotification ¶
SendWeightReminderNotification sends a weight reminder notification via Web Push
func (*Service) SendWorkoutNotification ¶
func (s *Service) SendWorkoutNotification(ctx context.Context, userID int64, session *store.WorkoutSession, group *store.WorkoutGroup, variant *store.WorkoutVariant) error
Click to show internal directories.
Click to hide internal directories.