notifications

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	ID        primitive.ObjectID `bson:"_id"`
	CreatedOn time.Time          `bson:"createdOn"`
	Flow      string             `bson:"type"`
	UserID    string             `bson:"userId"`
	Topic     string             `bson:"topic"`
	Header    string             `bson:"header"`
	Body      string             `bson:"body"`
	Params    map[string]string  `bson:"params,omitempty"`
	Meta      []string           `bson:"meta,omitempty"`
	IsSent    bool               `bson:"isSent"`
	SentOn    *time.Time         `bson:"sentOn,omitempty"`
	IsRead    bool               `bson:"isRead"`
	ReadOn    *time.Time         `bson:"readOn,omitempty"`
}

type NotificationHandlers

type NotificationHandlers struct {
	// contains filtered or unexported fields
}

func NewNotificationHandlers

func NewNotificationHandlers(service *NotificationService, log *zap.Logger) *NotificationHandlers

func (*NotificationHandlers) Reader

func (h *NotificationHandlers) Reader(c *gin.Context)

type NotificationRepository

type NotificationRepository struct {
	*passport.MongoRepository
}

func NewNotificationRepository

func NewNotificationRepository(client *mongo.Client, conf *passport.Config) *NotificationRepository

func (*NotificationRepository) GetAllNotRead

func (r *NotificationRepository) GetAllNotRead(ctx context.Context) ([]*Notification, error)

func (*NotificationRepository) GetAllNotSent

func (r *NotificationRepository) GetAllNotSent(ctx context.Context) ([]*Notification, error)

type NotificationService

type NotificationService struct {
	// contains filtered or unexported fields
}

func NewNotificationService

func NewNotificationService(repository *NotificationRepository, conf *passport.Config, log *zap.Logger, mc *passport.MailClient) *NotificationService

func (*NotificationService) Listener

func (s *NotificationService) Listener()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL