rework for moving of repo to go-playground
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
Library webhooks
|
Library webhooks
|
||||||
================
|
================
|
||||||
|
|
||||||
[](https://godoc.org/github.com/joeybloggs/webhooks)
|
[](https://godoc.org/gopkg.in/go-playground/webhooks)
|
||||||
|
|
||||||
Library webhooks allows for easy recieving and parsing of GitHub Webhook Events; more services to come i.e. BitBucket...
|
Library webhooks allows for easy recieving and parsing of GitHub Webhook Events; more services to come i.e. BitBucket...
|
||||||
|
|
||||||
@@ -19,20 +19,20 @@ Installation
|
|||||||
|
|
||||||
Use go get.
|
Use go get.
|
||||||
|
|
||||||
go get github.com/joeybloggs/webhooks
|
go get gopkg.in/go-playground/webhooks
|
||||||
|
|
||||||
or to update
|
or to update
|
||||||
|
|
||||||
go get -u github.com/joeybloggs/webhooks
|
go get -u gopkg.in/go-playground/webhooks
|
||||||
|
|
||||||
Then import the validator package into your own code.
|
Then import the validator package into your own code.
|
||||||
|
|
||||||
import "github.com/joeybloggs/webhooks"
|
import "gopkg.in/go-playground/webhooks"
|
||||||
|
|
||||||
Usage and documentation
|
Usage and documentation
|
||||||
------
|
------
|
||||||
|
|
||||||
Please see http://godoc.org/github.com/joeybloggs/webhooks for detailed usage docs.
|
Please see http://godoc.org/gopkg.in/go-playground/webhooks for detailed usage docs.
|
||||||
|
|
||||||
##### Examples:
|
##### Examples:
|
||||||
|
|
||||||
@@ -44,8 +44,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/joeybloggs/webhooks"
|
"gopkg.in/go-playground/webhooks"
|
||||||
"github.com/joeybloggs/webhooks/github"
|
"gopkg.in/go-playground/webhooks/github"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -100,8 +100,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/joeybloggs/webhooks"
|
"gopkg.in/go-playground/webhooks"
|
||||||
"github.com/joeybloggs/webhooks/github"
|
"gopkg.in/go-playground/webhooks/github"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/joeybloggs/webhooks"
|
"gopkg.in/go-playground/webhooks"
|
||||||
"github.com/joeybloggs/webhooks/github"
|
"gopkg.in/go-playground/webhooks/github"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/joeybloggs/webhooks"
|
"gopkg.in/go-playground/webhooks"
|
||||||
"github.com/joeybloggs/webhooks/github"
|
"gopkg.in/go-playground/webhooks/github"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/joeybloggs/webhooks"
|
"gopkg.in/go-playground/webhooks"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Webhook instance contains all methods needed to process events
|
// Webhook instance contains all methods needed to process events
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/joeybloggs/webhooks"
|
|
||||||
. "gopkg.in/go-playground/assert.v1"
|
. "gopkg.in/go-playground/assert.v1"
|
||||||
|
"gopkg.in/go-playground/webhooks"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NOTES:
|
// NOTES:
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ func RunServer(s *http.Server, hook Webhook, path string) error {
|
|||||||
// RunTLSServer runs a custom server with TLS configuration.
|
// RunTLSServer runs a custom server with TLS configuration.
|
||||||
// NOTE: http.Server Handler will be overridden by this library, just set it to nil.
|
// NOTE: http.Server Handler will be overridden by this library, just set it to nil.
|
||||||
// Setting the Certificates can be done in the http.Server.TLSConfig.Certificates
|
// Setting the Certificates can be done in the http.Server.TLSConfig.Certificates
|
||||||
// see example here: https://github.com/joeybloggs/webhooks/blob/master/webhooks_test.go#L178
|
// see example here: https://gopkg.in/go-playground/webhooks/blob/master/webhooks_test.go#L178
|
||||||
func RunTLSServer(s *http.Server, hook Webhook, path string) error {
|
func RunTLSServer(s *http.Server, hook Webhook, path string) error {
|
||||||
|
|
||||||
srv := &server{
|
srv := &server{
|
||||||
|
|||||||
Reference in New Issue
Block a user