Help us shape the future of Go! Take the 2026 Go Developer Survey

channels

package
v1.20.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseChannel

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

func NewDatabaseChannel

func NewDatabaseChannel(o orm.Orm) *DatabaseChannel

func (*DatabaseChannel) Deliver

func (c *DatabaseChannel) Deliver(route string, payload []byte) error

func (*DatabaseChannel) Name

func (c *DatabaseChannel) Name() string

func (*DatabaseChannel) Resolve

func (*DatabaseChannel) Send

type DatabaseNotificationModel

type DatabaseNotificationModel struct {
	ID             string     `gorm:"primaryKey;type:varchar(36);column:id"`
	Type           string     `gorm:"not null;column:type"`
	NotifiableType string     `gorm:"not null;column:notifiable_type"`
	NotifiableID   string     `gorm:"not null;column:notifiable_id"`
	Data           string     `gorm:"type:text;not null;column:data"`
	ReadAt         *time.Time `gorm:"column:read_at"`
	CreatedAt      time.Time  `gorm:"column:created_at"`
	UpdatedAt      time.Time  `gorm:"column:updated_at"`
}

func (DatabaseNotificationModel) TableName

func (DatabaseNotificationModel) TableName() string

type MailChannel

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

MailChannel delivers notifications via Goravel's mail facade.

func NewMailChannel

func NewMailChannel(mailer contractsmail.Mail) *MailChannel

func (*MailChannel) Deliver

func (c *MailChannel) Deliver(route string, payload []byte) error

Deliver unmarshals payload and sends via facades.Mail(), same mailable-construction logic the original Send() had inline.

func (*MailChannel) Name

func (c *MailChannel) Name() string

func (*MailChannel) Resolve

Resolve builds the MailMessage — via ToMail() if the notification implements MailableNotification, else a sensible fallback — and JSON-encodes it alongside the resolved recipient address(es).

func (*MailChannel) Send

type NotificationMailable

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

NotificationMailable adapts a MailMessage into contractsmail.Mailable.

func (*NotificationMailable) Attachments

func (m *NotificationMailable) Attachments() []string

func (*NotificationMailable) Content

func (*NotificationMailable) Envelope

func (*NotificationMailable) Headers

func (m *NotificationMailable) Headers() map[string]string

func (*NotificationMailable) Queue

func (*NotificationMailable) With

func (m *NotificationMailable) With() map[string]any

Jump to

Keyboard shortcuts

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