notification

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: BSD-2-Clause Imports: 8 Imported by: 11

Documentation

Index

Constants

View Source
const NotificationCleanCommandOperation base.CommandOperation = "clean-notifications"
View Source
const NotificationPublishCommandOperation base.CommandOperation = "notification-publish"

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationCleanCommand

type NotificationCleanCommand struct {
	// MaxAge is the maximum age of notifications to keep (e.g., "720h" for 30 days)
	MaxAge libtime.Duration `json:"maxAge"`
	// Limit is the maximum number of notifications to delete in one run (default: 10000)
	Limit int `json:"limit"`
}

func (NotificationCleanCommand) Ptr

func (NotificationCleanCommand) Validate

type NotificationCleanCommandSender

type NotificationCleanCommandSender interface {
	SendCleanNotificationCommand(
		ctx context.Context,
		command NotificationCleanCommand,
	) error
}

func NewNotificationCleanCommandSender

func NewNotificationCleanCommandSender(
	commandCreator base.CommandCreator,
	commandObjectSender cdb.CommandObjectSender,
	initiator cqrsiam.Initiator,
) NotificationCleanCommandSender

type NotificationCleanCommandSenderFunc

type NotificationCleanCommandSenderFunc func(ctx context.Context, command NotificationCleanCommand) error

func (NotificationCleanCommandSenderFunc) SendCleanNotificationCommand

func (n NotificationCleanCommandSenderFunc) SendCleanNotificationCommand(
	ctx context.Context,
	command NotificationCleanCommand,
) error

type NotificationPublishCommand

type NotificationPublishCommand struct {
	// Type of the notification
	Type core.NotificationType `json:"type"`

	// Target of the notification (discord channelName, telegram room ...)
	Target *core.NotificationTarget `json:"target,omitempty"`

	// Message of the notification
	Message core.NotificationMessage `json:"message"`

	// Metadata carries source-specific fields as opaque key/value pairs
	// (e.g. trading producers pack brokerIdentifier/stage/accountIdentifier here).
	Metadata map[string]string `json:"metadata,omitempty"`
}

func (NotificationPublishCommand) Ptr

func (NotificationPublishCommand) Validate

type NotificationPublishCommandSender

type NotificationPublishCommandSender interface {
	SendPublishNotificationCommand(
		ctx context.Context,
		command NotificationPublishCommand,
	) error
}

func NewNotificationPublishCommandSender

func NewNotificationPublishCommandSender(
	commandCreator base.CommandCreator,
	commandObjectSender cdb.CommandObjectSender,
	initiator cqrsiam.Initiator,
) NotificationPublishCommandSender

type NotificationPublishCommandSenderFunc

type NotificationPublishCommandSenderFunc func(ctx context.Context, command NotificationPublishCommand) error

func (NotificationPublishCommandSenderFunc) SendPublishNotificationCommand

func (n NotificationPublishCommandSenderFunc) SendPublishNotificationCommand(
	ctx context.Context,
	command NotificationPublishCommand,
) error

Jump to

Keyboard shortcuts

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