Post posts the message to webhook.
(webhookType storepb.WebhookType, context Context)
| 215 | |
| 216 | // Post posts the message to webhook. |
| 217 | func Post(webhookType storepb.WebhookType, context Context) error { |
| 218 | receiverMu.RLock() |
| 219 | r, ok := receivers[webhookType] |
| 220 | receiverMu.RUnlock() |
| 221 | if !ok { |
| 222 | return errors.Errorf("webhook: no applicable receiver for webhook type: %v", webhookType) |
| 223 | } |
| 224 | return r.Post(context) |
| 225 | } |
no test coverage detected