Documentation
¶
Index ¶
- type AdminNotification
- type Config
- type CreateSubscriptionRequest
- type CreateSubscriptionResponse
- type DeleteSubscriptionRequest
- type DeleteSubscriptionResponse
- type Filter
- type ListSubscriptionsResponse
- type NoopNotificationSender
- type NotificationSender
- type PublishMessage
- type SubscriptionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminNotification ¶
type AdminNotification struct {
To string
Subject string
Body string
SmsMessage string
Priority string // "high", "medium", "low"
}
AdminNotification represents an administrative notification
type Config ¶
type Config struct {
// Application name for notifications and messages
ApplicationName string
// Notification settings
NotificationSubject string
NotificationSmsPrefix string
// Logger configuration
LogLevel string
}
Config contains configuration for PubSub system This allows the library to be used in different projects
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns default configuration for FreiCON project
type CreateSubscriptionRequest ¶
type CreateSubscriptionRequest struct {
SubscriberID int64 `json:"clientID"`
CbuID int64 `json:"cbuId"`
TopicCode string `json:"class"`
Identifier string `json:"identifier"`
CallbackUrl string `json:"callbackURL"`
TrackID int64 `json:"trackId"`
}
func (CreateSubscriptionRequest) Validate ¶
func (m CreateSubscriptionRequest) Validate() error
type DeleteSubscriptionRequest ¶
type DeleteSubscriptionRequest struct {
ClientID int64 `json:"clientID"`
TrackID int64 `json:"trackId"`
}
func (DeleteSubscriptionRequest) Validate ¶
func (m DeleteSubscriptionRequest) Validate() error
type DeleteSubscriptionResponse ¶
type DeleteSubscriptionResponse struct {
model.Subscription
}
type ListSubscriptionsResponse ¶
type ListSubscriptionsResponse struct {
Items []model.Subscription `json:"items"`
}
type NoopNotificationSender ¶
type NoopNotificationSender struct{}
NoopNotificationSender is a no-op implementation for testing
func (*NoopNotificationSender) SendAdminNotification ¶
func (n *NoopNotificationSender) SendAdminNotification(ctx context.Context, notification AdminNotification) error
type NotificationSender ¶
type NotificationSender interface {
// SendAdminNotification sends a notification to administrators
SendAdminNotification(ctx context.Context, notification AdminNotification) error
}
NotificationSender defines interface for sending notifications This allows different implementations (email, SMS, etc.) to be plugged in
type PublishMessage ¶
type PublishMessage struct {
model.DataMessage
}
type SubscriptionResponse ¶
type SubscriptionResponse struct {
model.Subscription
}
Click to show internal directories.
Click to hide internal directories.