notification

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(repo Repo) core.NotificationService

Types

type Handler

type Handler interface {
	Subscribe(c echo.Context) error
	Delete(c echo.Context) error
	Get(c echo.Context) error
}

func NewHandler

func NewHandler(service core.NotificationService) Handler

type Reactor

type Reactor interface {
	Start(ctx context.Context)
}

func NewReactor

func NewReactor(service core.NotificationService, timeline core.TimelineService, opts webpush.Options) Reactor

type Repo

type Repo interface {
	Get(ctx context.Context, vendorID, owner string) (core.NotificationSubscription, error)
	Subscribe(ctx context.Context, notification core.NotificationSubscription) (core.NotificationSubscription, error)
	GetAllSubscriptions(ctx context.Context) ([]core.NotificationSubscription, error)
	Delete(ctx context.Context, vendorID, owner string) error
}

func NewRepository

func NewRepository(db *gorm.DB) Repo

type Worker

type Worker struct {
	MDate   time.Time
	Routine context.CancelFunc
}

Jump to

Keyboard shortcuts

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