notification

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package notification defines tenant-scoped notification messages and in-memory delivery helpers.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMessage = errors.New("gotenancy/notification: invalid message")

Functions

This section is empty.

Types

type MemoryNotifier

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

func NewMemoryNotifier

func NewMemoryNotifier() *MemoryNotifier

func (*MemoryNotifier) Messages

func (notifier *MemoryNotifier) Messages() []Message

func (*MemoryNotifier) Send

func (notifier *MemoryNotifier) Send(ctx context.Context, message Message) error

type Message

type Message struct {
	TenantID types.TenantID
	Channel  string
	To       string
	Subject  string
	Body     string
	Metadata map[string]string
}

type Notifier

type Notifier interface {
	Send(ctx context.Context, message Message) error
}

Jump to

Keyboard shortcuts

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