MCPcopy Create free account
hub / github.com/Unpackerr/unpackerr / HasEvent

Method HasEvent

pkg/unpackerr/webhook.go:332–340  ·  view source on GitHub ↗

HasEvent returns true if a status event is in the Events slice. Also returns true if the Events slice has only one value of WAITING.

(e ExtractStatus)

Source from the content-addressed store, hash-verified

330// HasEvent returns true if a status event is in the Events slice.
331// Also returns true if the Events slice has only one value of WAITING.
332func (w *WebhookConfig) HasEvent(e ExtractStatus) bool {
333 for _, status := range w.Events {
334 if (status == WAITING && len(w.Events) == 1) || status == e {
335 return true
336 }
337 }
338
339 return false
340}
341
342// WebhookCounts returns the total count of requests and errors for all webhooks.
343func (u *Unpackerr) WebhookCounts() (uint, uint) {

Callers 1

runAllHooksMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected