notifications

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 17 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 {
	Channel() <-chan *events.Event
	AddToQueue(event *events.Event)
}

type Nip47Notifier

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

func NewNip47Notifier

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

func (*Nip47Notifier) ConsumeEvent

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

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
}

Jump to

Keyboard shortcuts

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