Documentation
¶
Overview ¶
Package github implements the gateway.NotificationAdapter for GitHub webhooks.
Index ¶
- type Adapter
- func (a *Adapter) Channels() []gateway.ChannelInfo
- func (a *Adapter) HTTPHandler() http.Handler
- func (a *Adapter) Name() string
- func (a *Adapter) Start(_ context.Context, handler func(gateway.Notification)) error
- func (a *Adapter) Status() gateway.AdapterStatus
- func (a *Adapter) Stop() error
- func (a *Adapter) Type() gateway.AdapterType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements gateway.NotificationAdapter for GitHub webhooks.
func New ¶
New creates a new GitHub webhook adapter with the given HMAC secret. If secret is empty, signature validation is skipped.
func NewNamed ¶
NewNamed creates a named GitHub adapter for multi-repo setups (e.g. "github:bc", "github:trade").
func (*Adapter) Channels ¶
func (a *Adapter) Channels() []gateway.ChannelInfo
Channels returns common GitHub event types as discoverable channels.
func (*Adapter) HTTPHandler ¶
HTTPHandler returns an http.Handler that validates and processes GitHub webhook payloads.
func (*Adapter) Status ¶
func (a *Adapter) Status() gateway.AdapterStatus
Status returns the adapter's connection state.
func (*Adapter) Type ¶
func (a *Adapter) Type() gateway.AdapterType
Type returns AdapterWebhook since GitHub delivers events via HTTP POST.