Skip to content

deadmanssnitch/go-dmswebhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Receiver for Dead Man's Snitch Webhooks

GoDoc

This package provides a net/http compatible handler to for parsing and receiving Alert Webhooks from Dead Man's Snitch.

Webhook Docs

Basic Usage:

// NewHandler takes a callback function which is called when alerts are received
handler := dmswebhooks.NewHandler(
  func(alert *dmswebhooks.Alert) error {
    if(alert.Type == dmswebhooks.TypeSnitchReporting) {
      fmt.Println("🎉")
    }

    return nil
  }
)

# Handler will process requests at root (/)
http.ListenAndServe(":8080", handler)

For a more complete (and fully functional example) we've built a basic Hipchat alerter.

Releases

No releases published

Packages

No packages published

Languages