Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/usage/pkg/apiv1/billing_noop.go
2499 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 apiv1
6
7
import (
8
"context"
9
10
"github.com/gitpod-io/gitpod/common-go/log"
11
v1 "github.com/gitpod-io/gitpod/usage-api/v1"
12
)
13
14
// BillingServiceNoop is used for Self-Hosted installations
15
type BillingServiceNoop struct {
16
v1.UnimplementedBillingServiceServer
17
}
18
19
func (s *BillingServiceNoop) ReconcileInvoices(_ context.Context, _ *v1.ReconcileInvoicesRequest) (*v1.ReconcileInvoicesResponse, error) {
20
log.Infof("ReconcileInvoices RPC invoked in no-op mode, no invoices will be updated.")
21
return &v1.ReconcileInvoicesResponse{}, nil
22
}
23
24
func (s *BillingServiceNoop) CancelSubscription(ctx context.Context, in *v1.CancelSubscriptionRequest) (*v1.CancelSubscriptionResponse, error) {
25
log.Infof("ReconcileInvoices RPC invoked in no-op mode, no invoices will be updated.")
26
return &v1.CancelSubscriptionResponse{}, nil
27
}
28
29