notifications

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PAYMENT_RECEIVED_NOTIFICATION = "payment_received"
	PAYMENT_SENT_NOTIFICATION     = "payment_sent"
)

Variables

This section is empty.

Functions

func NewNip47NotificationQueue

func NewNip47NotificationQueue() *nip47NotificationQueue

Queue events that will be consumed when the relay connection is online

Types

type Nip47NotificationQueue

type Nip47NotificationQueue interface {
	events.EventSubscriber
	Channel() <-chan *events.Event
}

type Nip47Notifier

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

func NewNip47Notifier

func NewNip47Notifier(relay Relay, db *gorm.DB, cfg config.Config, keys keys.Keys, permissionsSvc permissions.PermissionsService, lnClient lnclient.LNClient) *Nip47Notifier

func (*Nip47Notifier) ConsumeEvent

func (notifier *Nip47Notifier) ConsumeEvent(ctx context.Context, event *events.Event) error

type Notification

type Notification struct {
	Notification     interface{} `json:"notification,omitempty"`
	NotificationType string      `json:"notification_type"`
}

type PaymentReceivedNotification

type PaymentReceivedNotification struct {
	models.Transaction
}

type PaymentSentNotification

type PaymentSentNotification struct {
	models.Transaction
}

type Relay

type Relay interface {
	Publish(ctx context.Context, event nostr.Event) error
}

Jump to

Keyboard shortcuts

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