Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetInstance ¶ added in v0.2.2
func SetInstance(i Service)
Types ¶
type EventHookAudit ¶ added in v1.3.0
type EventHookAudit struct {
// contains filtered or unexported fields
}
func NewAudit ¶ added in v1.3.0
func NewAudit(db *gorm.DB) *EventHookAudit
func (*EventHookAudit) IsDuplicate ¶ added in v1.3.1
func (r *EventHookAudit) IsDuplicate(message *sdk.EventHookMessage) bool
func (*EventHookAudit) Log ¶ added in v1.3.0
func (r *EventHookAudit) Log(message *sdk.EventHookMessage)
type EventHooksProvider ¶
type EventHooksProvider interface { // Gets the subscriptions for an event type Get() ([]*model.EventHook, error) }
func NewEventHooksProvider ¶
func NewEventHooksProvider(db *gorm.DB) EventHooksProvider
type NotifyFunc ¶ added in v1.3.0
notify is the function signature for the event hook Add
type Publisher ¶
type Publisher interface { // publishes a message to all web hook subscriptions Publish(message *sdk.EventHookMessage) error }
Publishes event hook messages to all web hooks registered in the system.
func NewEventHookPublisher ¶
func NewEventHookPublisher(subscriptionsProvider EventHooksProvider, recorder *EventHookAudit) Publisher
type Service ¶ added in v1.3.0
type Service interface { // adds a message to the hooks queue Notify(ctx context.Context, message *sdk.EventHookMessage) (uuid.UUID, error) }
This implementation is to make the semantics clear that this is the lifecycle of a hook message: eventHookMessage --> added to queue --> received --> executed handler (events) --> publish the message using Publisher.Publish() queue for adding hook messages to be published
func NewService ¶ added in v1.3.0
func NewService(messageSender messaging.MessageSender) Service
Click to show internal directories.
Click to hide internal directories.