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 (n NotificationCleanCommand) Ptr() *NotificationCleanCommand
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 (n NotificationPublishCommand) Ptr() *NotificationPublishCommand
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
Click to show internal directories.
Click to hide internal directories.