https://github.com/keisukeyamashita/go-pagerduty-webhook
Util package for Pagerduty Webhook V2 📟📞🐞
https://github.com/keisukeyamashita/go-pagerduty-webhook
go pagerduty webhook
Last synced: 7 months ago
JSON representation
Util package for Pagerduty Webhook V2 📟📞🐞
- Host: GitHub
- URL: https://github.com/keisukeyamashita/go-pagerduty-webhook
- Owner: KeisukeYamashita
- License: apache-2.0
- Created: 2019-09-09T06:39:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-12T11:22:37.000Z (about 6 years ago)
- Last Synced: 2024-10-05T12:22:38.515Z (about 1 year ago)
- Topics: go, pagerduty, webhook
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-pagerduty-webhook
[![License][license-badge]][license]
[![CircleCI][circleci-badge]][circleci]
[](https://codecov.io/gh/KeisukeYamashita/go-pagerduty-webhook)
[![GolangCI][golangci-badge]][golangci]`go-pagerduty-webhook` is a package to use for [Pagerduty Webhook V2](https://v2.developer.pagerduty.com/docs/webhooks-v2-overview).
## What
The goal is to provide all types for parcing payload from the Webhook.
## Usage
### Use in your Webhook server
```
func (ctr Controller) IncidentHandler() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
decoder := json.NewDecoder(r.Body)
var payload webhook.Payload
_ = decoder.Decode(&payload)
}
}
```## Author
* [KeisukeYamashita<19yamashita15@gmail.com>](https://github.com/KeisukeYamashita)
[license]: LICENSE
[circleci]: https://circleci.com/gh/KeisukeYamashita/workflows/go-pagerduty-recorder
[godoc]: https://godoc.org/github.com/KeisukeYamashita/go-pagerduty-recorder
[go-report-card]: https://goreportcard.com/report/github.com/KeisukeYamashita/go-pagerduty-recorder
[golangci]: https://golangci.com/r/github.com/KeisukeYamashita/go-pagerduty-recorder[license-badge]: https://img.shields.io/badge/license-Apache%202.0-%23E93424
[circleci-badge]: https://img.shields.io/circleci/project/github/KeisukeYamashita/go-pagerduty-webhook?label=circleci&logo=circleci
[godoc-badge]: https://img.shields.io/badge/godoc.org-reference-blue.svg
[go-report-card-badge]: https://goreportcard.com/badge/github.com/KeisukeYamashita/go-pagerduty-recorder
[golangci-badge]: https://golangci.com/badges/github.com/KeisukeYamashita/go-pagerduty-webhook.svg