From b1af8fd87760b34e3ff2fd3bda38f211815a0473 Mon Sep 17 00:00:00 2001 From: Terin Stock Date: Sun, 9 Mar 2025 17:47:56 +0100 Subject: [chore] remove vendor --- .../SherClockHolmes/webpush-go/README.md | 63 ---------------------- 1 file changed, 63 deletions(-) delete mode 100644 vendor/github.com/SherClockHolmes/webpush-go/README.md (limited to 'vendor/github.com/SherClockHolmes/webpush-go/README.md') diff --git a/vendor/github.com/SherClockHolmes/webpush-go/README.md b/vendor/github.com/SherClockHolmes/webpush-go/README.md deleted file mode 100644 index c313fc6b1..000000000 --- a/vendor/github.com/SherClockHolmes/webpush-go/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# webpush-go - -[![Go Report Card](https://goreportcard.com/badge/github.com/SherClockHolmes/webpush-go)](https://goreportcard.com/report/github.com/SherClockHolmes/webpush-go) -[![GoDoc](https://godoc.org/github.com/SherClockHolmes/webpush-go?status.svg)](https://godoc.org/github.com/SherClockHolmes/webpush-go) - -Web Push API Encryption with VAPID support. - -```bash -go get -u github.com/SherClockHolmes/webpush-go -``` - -## Example - -For a full example, refer to the code in the [example](example/) directory. - -```go -package main - -import ( - "encoding/json" - - webpush "github.com/SherClockHolmes/webpush-go" -) - -func main() { - // Decode subscription - s := &webpush.Subscription{} - json.Unmarshal([]byte(""), s) - - // Send Notification - resp, err := webpush.SendNotification([]byte("Test"), s, &webpush.Options{ - Subscriber: "example@example.com", - VAPIDPublicKey: "", - VAPIDPrivateKey: "", - TTL: 30, - }) - if err != nil { - // TODO: Handle error - } - defer resp.Body.Close() -} -``` - -### Generating VAPID Keys - -Use the helper method `GenerateVAPIDKeys` to generate the VAPID key pair. - -```golang -privateKey, publicKey, err := webpush.GenerateVAPIDKeys() -if err != nil { - // TODO: Handle error -} -``` - -## Development - -1. Install [Go 1.11+](https://golang.org/) -2. `go mod vendor` -3. `go test` - -#### For other language implementations visit: - -[WebPush Libs](https://github.com/web-push-libs) -- cgit v1.3