Documentation
¶
Index ¶
- Constants
- Variables
- type Broadcaster
- type Event
- type HeaderOption
- type Manager
- func (m *Manager) BroadcastAction(_ context.Context, event Event) error
- func (m *Manager) Delete(ctx context.Context, wh Webhook) error
- func (m *Manager) Info() ([]Webhook, []WebhookQueueInfo)
- func (m *Manager) Register(ctx context.Context, wh Webhook) error
- func (m *Manager) Shutdown(ctx context.Context) error
- type NoopBroadcaster
- type Webhook
- type WebhookQueueInfo
- type WebhookStore
Constants ¶
View Source
const (
WebhookEventPing = "ping"
)
Variables ¶
View Source
var ErrWebhookNotFound = errors.New("Webhook not found")
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Event ¶
type Event struct { Module string `json:"module"` Event string `json:"event"` Payload interface{} `json:"payload,omitempty"` }
Event describes an event that has been triggered.
type HeaderOption ¶ added in v1.0.8
func WithBasicAuth ¶ added in v1.0.8
func WithBasicAuth(username, password string) HeaderOption
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(store WebhookStore, logger *zap.Logger) (*Manager, error)
func (*Manager) BroadcastAction ¶
func (*Manager) Info ¶
func (m *Manager) Info() ([]Webhook, []WebhookQueueInfo)
type NoopBroadcaster ¶
type NoopBroadcaster struct{}
func (NoopBroadcaster) BroadcastAction ¶
func (NoopBroadcaster) BroadcastAction(_ context.Context, _ Event) error
type Webhook ¶
type WebhookQueueInfo ¶
Click to show internal directories.
Click to hide internal directories.