Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api-server/pkg/webhooks/stripe_noop.go
2500 views
1
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package webhooks
6
7
import (
8
"github.com/gitpod-io/gitpod/common-go/log"
9
"net/http"
10
)
11
12
func NewNoopWebhookHandler() *noopWebhookHandler {
13
return &noopWebhookHandler{}
14
}
15
16
type noopWebhookHandler struct{}
17
18
func (h *noopWebhookHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
19
log.Info("Received Stripe webhook handler, but running in no-op mode so will not be handing it.")
20
w.WriteHeader(http.StatusNotImplemented)
21
}
22
23