notification

package
v0.0.0-...-1d800d4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	GetAllForUser(ctx context.Context, userId sharedTypes.UUID, notifications *[]Notification) error
	Resend(ctx context.Context, notification Notification) error
	RemoveById(ctx context.Context, userId sharedTypes.UUID, notificationId sharedTypes.UUID) error
}

func New

func New(db *pgxpool.Pool) Manager

type Notification

type Notification struct {
	Id             sharedTypes.UUID `json:"_id"`
	UserId         sharedTypes.UUID `json:"user_id"`
	Expires        time.Time        `json:"expires,omitempty"`
	Key            string           `json:"key"`
	TemplateKey    string           `json:"templateKey,omitempty"`
	MessageOptions json.RawMessage  `json:"messageOpts,omitempty"`
}

type Notifications

type Notifications []Notification

Jump to

Keyboard shortcuts

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