Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KafkaNotifier ¶
type KafkaNotifier struct {
// contains filtered or unexported fields
}
KafkaNotifier represents the Kafka notifier.
func NewKafkaNotifier ¶
func NewKafkaNotifier(bootstrapServers, topic string) (*KafkaNotifier, error)
NewKafkaNotifier creates a new instance of KafkaNotifier.
func (*KafkaNotifier) Close ¶
func (n *KafkaNotifier) Close() error
func (*KafkaNotifier) NotifyUserChange ¶
func (n *KafkaNotifier) NotifyUserChange(eventType UserEventType, user *domain.User) error
type UserEvent ¶
type UserEvent struct { Type UserEventType `json:"type"` UserID string `json:"user_id"` User *domain.User `json:"user,omitempty"` }
type UserEventType ¶
type UserEventType string
var ( Created UserEventType = "CREATED" Updated UserEventType = "UPDATED" Deleted UserEventType = "DELETED" )
type UserNotifier ¶
type UserNotifier interface {
NotifyUserChange(eventType UserEventType, user *domain.User) error
}
UserNotifier represents the user notifier.
Click to show internal directories.
Click to hide internal directories.