2026-09-05 00:57:28 +03:00
//
// Copyright 2026 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc v7.34.1
// source: org/signal/chat/subscriptions.proto
package subscriptions
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
const (
Subscriptions_UpdateSubscriber_FullMethodName = "/org.signal.chat.purchase.Subscriptions/UpdateSubscriber"
Subscriptions_DeleteSubscriber_FullMethodName = "/org.signal.chat.purchase.Subscriptions/DeleteSubscriber"
Subscriptions_CreatePaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/CreatePaymentMethod"
Subscriptions_CreatePayPalPaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/CreatePayPalPaymentMethod"
Subscriptions_SetDefaultPaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetDefaultPaymentMethod"
Subscriptions_SetSubscriptionLevel_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetSubscriptionLevel"
Subscriptions_GetSubscriptionInformation_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetSubscriptionInformation"
2026-10-08 15:18:56 +03:00
Subscriptions_GetReceiptCredential_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetReceiptCredential"
2026-09-05 00:57:28 +03:00
Subscriptions_SetIapSubscription_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetIapSubscription"
Subscriptions_GetBankMandate_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetBankMandate"
)
// SubscriptionsClient is the client API for Subscriptions service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// # Service for creating donation subscriptions
//
// Configuration for subscription levels can be found in ProductConfiguration.
type SubscriptionsClient interface {
2026-10-01 18:12:17 +03:00
// Creates a subscriber record if it does not exist, otherwise refreshes its last access time.
//
2026-09-05 00:57:28 +03:00
// Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers
// SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended
// period of time will result in the subscription being canceled.
UpdateSubscriber ( ctx context . Context , in * UpdateSubscriberRequest , opts ... grpc . CallOption ) ( * UpdateSubscriberResponse , error )
// Cancels any current subscription at the end of the current subscription period.
//
// Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after
// cancelling a subscription from storekit to keep server data up to date.
DeleteSubscriber ( ctx context . Context , in * DeleteSubscriberRequest , opts ... grpc . CallOption ) ( * DeleteSubscriberResponse , error )
// Returns a client secret that can be used to set up a new payment method with the payment processor.
CreatePaymentMethod ( ctx context . Context , in * CreatePaymentMethodRequest , opts ... grpc . CallOption ) ( * CreatePaymentMethodResponse , error )
// Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method.
2026-10-01 18:12:17 +03:00
//
// The presented billing agreement may be localized. Callers should set their
// language preferences via an "Accept-Language" header on the request:
// https://datatracker.ietf.org/doc/html/rfc3282#section-3
2026-09-05 00:57:28 +03:00
CreatePayPalPaymentMethod ( ctx context . Context , in * CreatePayPalPaymentMethodRequest , opts ... grpc . CallOption ) ( * CreatePayPalPaymentMethodResponse , error )
// Sets the default payment method for a subscriber.
SetDefaultPaymentMethod ( ctx context . Context , in * SetDefaultPaymentMethodRequest , opts ... grpc . CallOption ) ( * SetDefaultPaymentMethodResponse , error )
// Sets the subscription level and currency for a subscriber.
SetSubscriptionLevel ( ctx context . Context , in * SetSubscriptionLevelRequest , opts ... grpc . CallOption ) ( * SetSubscriptionLevelResponse , error )
// Returns information about the current subscription associated with the provided subscriberId if one exists.
//
// Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses),
// the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped
// to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned
// by the API.
GetSubscriptionInformation ( ctx context . Context , in * GetSubscriptionInformationRequest , opts ... grpc . CallOption ) ( * GetSubscriptionInformationResponse , error )
// Create a receipt from a valid payment invoice that can be used to obtain an entitlement
//
// This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same
// ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After
// this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment
// invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until
// receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation
// and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same
2026-10-08 15:18:56 +03:00
// ReceiptCredentialRequest MUST NOT be used again to request a receipt credential.
2026-09-05 00:57:28 +03:00
//
// Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this
// operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the
// latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important
// thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated
// ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that
// cannot be redeemed.
//
// Clients MUST validate that the generated receipt credential's level and expiration matches their expectations.
2026-10-08 15:18:56 +03:00
GetReceiptCredential ( ctx context . Context , in * GetReceiptCredentialRequest , opts ... grpc . CallOption ) ( * GetReceiptCredentialResponse , error )
2026-09-05 00:57:28 +03:00
// Set a token that represents an IAP subscription made with App Store/Google Play Billing.
//
// To set up an App Store subscription:
// 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber)
// 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store
// directly via StoreKit and obtain a originalTransactionId.
// 3. Call this RPC with the originalTransactionId
2026-10-08 15:18:56 +03:00
// 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the
2026-09-05 00:57:28 +03:00
// entitlement
//
// Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing.
//
// To set up a subscription with Google Play Billing:
// 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber)
// 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing
// directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions)
// the purchaseToken.
// 3. Call this RPC with the purchaseToken
2026-10-08 15:18:56 +03:00
// 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the
2026-09-05 00:57:28 +03:00
// entitlement
//
// After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling
// this method to ensure their payment is tracked.
//
// Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment
// method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription
// associated with the old purchaseToken will be cancelled.
SetIapSubscription ( ctx context . Context , in * SetIapSubscriptionRequest , opts ... grpc . CallOption ) ( * SetIapSubscriptionResponse , error )
2026-10-01 18:12:17 +03:00
// Returns a localized bank mandate for the specified bank transfer type.
//
// Callers should set their language preferences via an "Accept-Language"
// header on the request:
// https://datatracker.ietf.org/doc/html/rfc3282#section-3
2026-09-05 00:57:28 +03:00
GetBankMandate ( ctx context . Context , in * GetBankMandateRequest , opts ... grpc . CallOption ) ( * GetBankMandateResponse , error )
}
type subscriptionsClient struct {
cc grpc . ClientConnInterface
}
func NewSubscriptionsClient ( cc grpc . ClientConnInterface ) SubscriptionsClient {
return & subscriptionsClient { cc }
}
func ( c * subscriptionsClient ) UpdateSubscriber ( ctx context . Context , in * UpdateSubscriberRequest , opts ... grpc . CallOption ) ( * UpdateSubscriberResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( UpdateSubscriberResponse )
err := c . cc . Invoke ( ctx , Subscriptions_UpdateSubscriber_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) DeleteSubscriber ( ctx context . Context , in * DeleteSubscriberRequest , opts ... grpc . CallOption ) ( * DeleteSubscriberResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( DeleteSubscriberResponse )
err := c . cc . Invoke ( ctx , Subscriptions_DeleteSubscriber_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) CreatePaymentMethod ( ctx context . Context , in * CreatePaymentMethodRequest , opts ... grpc . CallOption ) ( * CreatePaymentMethodResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( CreatePaymentMethodResponse )
err := c . cc . Invoke ( ctx , Subscriptions_CreatePaymentMethod_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) CreatePayPalPaymentMethod ( ctx context . Context , in * CreatePayPalPaymentMethodRequest , opts ... grpc . CallOption ) ( * CreatePayPalPaymentMethodResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( CreatePayPalPaymentMethodResponse )
err := c . cc . Invoke ( ctx , Subscriptions_CreatePayPalPaymentMethod_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) SetDefaultPaymentMethod ( ctx context . Context , in * SetDefaultPaymentMethodRequest , opts ... grpc . CallOption ) ( * SetDefaultPaymentMethodResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( SetDefaultPaymentMethodResponse )
err := c . cc . Invoke ( ctx , Subscriptions_SetDefaultPaymentMethod_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) SetSubscriptionLevel ( ctx context . Context , in * SetSubscriptionLevelRequest , opts ... grpc . CallOption ) ( * SetSubscriptionLevelResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( SetSubscriptionLevelResponse )
err := c . cc . Invoke ( ctx , Subscriptions_SetSubscriptionLevel_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) GetSubscriptionInformation ( ctx context . Context , in * GetSubscriptionInformationRequest , opts ... grpc . CallOption ) ( * GetSubscriptionInformationResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( GetSubscriptionInformationResponse )
err := c . cc . Invoke ( ctx , Subscriptions_GetSubscriptionInformation_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-10-08 15:18:56 +03:00
func ( c * subscriptionsClient ) GetReceiptCredential ( ctx context . Context , in * GetReceiptCredentialRequest , opts ... grpc . CallOption ) ( * GetReceiptCredentialResponse , error ) {
2026-09-05 00:57:28 +03:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-10-08 15:18:56 +03:00
out := new ( GetReceiptCredentialResponse )
err := c . cc . Invoke ( ctx , Subscriptions_GetReceiptCredential_FullMethodName , in , out , cOpts ... )
2026-09-05 00:57:28 +03:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) SetIapSubscription ( ctx context . Context , in * SetIapSubscriptionRequest , opts ... grpc . CallOption ) ( * SetIapSubscriptionResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( SetIapSubscriptionResponse )
err := c . cc . Invoke ( ctx , Subscriptions_SetIapSubscription_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * subscriptionsClient ) GetBankMandate ( ctx context . Context , in * GetBankMandateRequest , opts ... grpc . CallOption ) ( * GetBankMandateResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( GetBankMandateResponse )
err := c . cc . Invoke ( ctx , Subscriptions_GetBankMandate_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
// SubscriptionsServer is the server API for Subscriptions service.
// All implementations must embed UnimplementedSubscriptionsServer
// for forward compatibility.
//
// # Service for creating donation subscriptions
//
// Configuration for subscription levels can be found in ProductConfiguration.
type SubscriptionsServer interface {
2026-10-01 18:12:17 +03:00
// Creates a subscriber record if it does not exist, otherwise refreshes its last access time.
//
2026-09-05 00:57:28 +03:00
// Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers
// SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended
// period of time will result in the subscription being canceled.
UpdateSubscriber ( context . Context , * UpdateSubscriberRequest ) ( * UpdateSubscriberResponse , error )
// Cancels any current subscription at the end of the current subscription period.
//
// Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after
// cancelling a subscription from storekit to keep server data up to date.
DeleteSubscriber ( context . Context , * DeleteSubscriberRequest ) ( * DeleteSubscriberResponse , error )
// Returns a client secret that can be used to set up a new payment method with the payment processor.
CreatePaymentMethod ( context . Context , * CreatePaymentMethodRequest ) ( * CreatePaymentMethodResponse , error )
// Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method.
2026-10-01 18:12:17 +03:00
//
// The presented billing agreement may be localized. Callers should set their
// language preferences via an "Accept-Language" header on the request:
// https://datatracker.ietf.org/doc/html/rfc3282#section-3
2026-09-05 00:57:28 +03:00
CreatePayPalPaymentMethod ( context . Context , * CreatePayPalPaymentMethodRequest ) ( * CreatePayPalPaymentMethodResponse , error )
// Sets the default payment method for a subscriber.
SetDefaultPaymentMethod ( context . Context , * SetDefaultPaymentMethodRequest ) ( * SetDefaultPaymentMethodResponse , error )
// Sets the subscription level and currency for a subscriber.
SetSubscriptionLevel ( context . Context , * SetSubscriptionLevelRequest ) ( * SetSubscriptionLevelResponse , error )
// Returns information about the current subscription associated with the provided subscriberId if one exists.
//
// Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses),
// the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped
// to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned
// by the API.
GetSubscriptionInformation ( context . Context , * GetSubscriptionInformationRequest ) ( * GetSubscriptionInformationResponse , error )
// Create a receipt from a valid payment invoice that can be used to obtain an entitlement
//
// This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same
// ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After
// this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment
// invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until
// receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation
// and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same
2026-10-08 15:18:56 +03:00
// ReceiptCredentialRequest MUST NOT be used again to request a receipt credential.
2026-09-05 00:57:28 +03:00
//
// Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this
// operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the
// latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important
// thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated
// ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that
// cannot be redeemed.
//
// Clients MUST validate that the generated receipt credential's level and expiration matches their expectations.
2026-10-08 15:18:56 +03:00
GetReceiptCredential ( context . Context , * GetReceiptCredentialRequest ) ( * GetReceiptCredentialResponse , error )
2026-09-05 00:57:28 +03:00
// Set a token that represents an IAP subscription made with App Store/Google Play Billing.
//
// To set up an App Store subscription:
// 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber)
// 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store
// directly via StoreKit and obtain a originalTransactionId.
// 3. Call this RPC with the originalTransactionId
2026-10-08 15:18:56 +03:00
// 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the
2026-09-05 00:57:28 +03:00
// entitlement
//
// Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing.
//
// To set up a subscription with Google Play Billing:
// 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber)
// 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing
// directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions)
// the purchaseToken.
// 3. Call this RPC with the purchaseToken
2026-10-08 15:18:56 +03:00
// 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the
2026-09-05 00:57:28 +03:00
// entitlement
//
// After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling
// this method to ensure their payment is tracked.
//
// Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment
// method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription
// associated with the old purchaseToken will be cancelled.
SetIapSubscription ( context . Context , * SetIapSubscriptionRequest ) ( * SetIapSubscriptionResponse , error )
2026-10-01 18:12:17 +03:00
// Returns a localized bank mandate for the specified bank transfer type.
//
// Callers should set their language preferences via an "Accept-Language"
// header on the request:
// https://datatracker.ietf.org/doc/html/rfc3282#section-3
2026-09-05 00:57:28 +03:00
GetBankMandate ( context . Context , * GetBankMandateRequest ) ( * GetBankMandateResponse , error )
mustEmbedUnimplementedSubscriptionsServer ( )
}
// UnimplementedSubscriptionsServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSubscriptionsServer struct { }
func ( UnimplementedSubscriptionsServer ) UpdateSubscriber ( context . Context , * UpdateSubscriberRequest ) ( * UpdateSubscriberResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method UpdateSubscriber not implemented" )
}
func ( UnimplementedSubscriptionsServer ) DeleteSubscriber ( context . Context , * DeleteSubscriberRequest ) ( * DeleteSubscriberResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method DeleteSubscriber not implemented" )
}
func ( UnimplementedSubscriptionsServer ) CreatePaymentMethod ( context . Context , * CreatePaymentMethodRequest ) ( * CreatePaymentMethodResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method CreatePaymentMethod not implemented" )
}
func ( UnimplementedSubscriptionsServer ) CreatePayPalPaymentMethod ( context . Context , * CreatePayPalPaymentMethodRequest ) ( * CreatePayPalPaymentMethodResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method CreatePayPalPaymentMethod not implemented" )
}
func ( UnimplementedSubscriptionsServer ) SetDefaultPaymentMethod ( context . Context , * SetDefaultPaymentMethodRequest ) ( * SetDefaultPaymentMethodResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method SetDefaultPaymentMethod not implemented" )
}
func ( UnimplementedSubscriptionsServer ) SetSubscriptionLevel ( context . Context , * SetSubscriptionLevelRequest ) ( * SetSubscriptionLevelResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method SetSubscriptionLevel not implemented" )
}
func ( UnimplementedSubscriptionsServer ) GetSubscriptionInformation ( context . Context , * GetSubscriptionInformationRequest ) ( * GetSubscriptionInformationResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetSubscriptionInformation not implemented" )
}
2026-10-08 15:18:56 +03:00
func ( UnimplementedSubscriptionsServer ) GetReceiptCredential ( context . Context , * GetReceiptCredentialRequest ) ( * GetReceiptCredentialResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetReceiptCredential not implemented" )
2026-09-05 00:57:28 +03:00
}
func ( UnimplementedSubscriptionsServer ) SetIapSubscription ( context . Context , * SetIapSubscriptionRequest ) ( * SetIapSubscriptionResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method SetIapSubscription not implemented" )
}
func ( UnimplementedSubscriptionsServer ) GetBankMandate ( context . Context , * GetBankMandateRequest ) ( * GetBankMandateResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetBankMandate not implemented" )
}
func ( UnimplementedSubscriptionsServer ) mustEmbedUnimplementedSubscriptionsServer ( ) { }
func ( UnimplementedSubscriptionsServer ) testEmbeddedByValue ( ) { }
// UnsafeSubscriptionsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SubscriptionsServer will
// result in compilation errors.
type UnsafeSubscriptionsServer interface {
mustEmbedUnimplementedSubscriptionsServer ( )
}
func RegisterSubscriptionsServer ( s grpc . ServiceRegistrar , srv SubscriptionsServer ) {
// If the following call panics, it indicates UnimplementedSubscriptionsServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv . ( interface { testEmbeddedByValue ( ) } ) ; ok {
t . testEmbeddedByValue ( )
}
s . RegisterService ( & Subscriptions_ServiceDesc , srv )
}
func _Subscriptions_UpdateSubscriber_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UpdateSubscriberRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . UpdateSubscriber ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_UpdateSubscriber_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . UpdateSubscriber ( ctx , req . ( * UpdateSubscriberRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_DeleteSubscriber_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DeleteSubscriberRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . DeleteSubscriber ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_DeleteSubscriber_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . DeleteSubscriber ( ctx , req . ( * DeleteSubscriberRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_CreatePaymentMethod_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreatePaymentMethodRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . CreatePaymentMethod ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_CreatePaymentMethod_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . CreatePaymentMethod ( ctx , req . ( * CreatePaymentMethodRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_CreatePayPalPaymentMethod_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreatePayPalPaymentMethodRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . CreatePayPalPaymentMethod ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_CreatePayPalPaymentMethod_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . CreatePayPalPaymentMethod ( ctx , req . ( * CreatePayPalPaymentMethodRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_SetDefaultPaymentMethod_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetDefaultPaymentMethodRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . SetDefaultPaymentMethod ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_SetDefaultPaymentMethod_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . SetDefaultPaymentMethod ( ctx , req . ( * SetDefaultPaymentMethodRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_SetSubscriptionLevel_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetSubscriptionLevelRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . SetSubscriptionLevel ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_SetSubscriptionLevel_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . SetSubscriptionLevel ( ctx , req . ( * SetSubscriptionLevelRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_GetSubscriptionInformation_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetSubscriptionInformationRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . GetSubscriptionInformation ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_GetSubscriptionInformation_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . GetSubscriptionInformation ( ctx , req . ( * GetSubscriptionInformationRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2026-10-08 15:18:56 +03:00
func _Subscriptions_GetReceiptCredential_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetReceiptCredentialRequest )
2026-09-05 00:57:28 +03:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2026-10-08 15:18:56 +03:00
return srv . ( SubscriptionsServer ) . GetReceiptCredential ( ctx , in )
2026-09-05 00:57:28 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2026-10-08 15:18:56 +03:00
FullMethod : Subscriptions_GetReceiptCredential_FullMethodName ,
2026-09-05 00:57:28 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-10-08 15:18:56 +03:00
return srv . ( SubscriptionsServer ) . GetReceiptCredential ( ctx , req . ( * GetReceiptCredentialRequest ) )
2026-09-05 00:57:28 +03:00
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_SetIapSubscription_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetIapSubscriptionRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . SetIapSubscription ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_SetIapSubscription_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . SetIapSubscription ( ctx , req . ( * SetIapSubscriptionRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Subscriptions_GetBankMandate_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetBankMandateRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SubscriptionsServer ) . GetBankMandate ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Subscriptions_GetBankMandate_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SubscriptionsServer ) . GetBankMandate ( ctx , req . ( * GetBankMandateRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// Subscriptions_ServiceDesc is the grpc.ServiceDesc for Subscriptions service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Subscriptions_ServiceDesc = grpc . ServiceDesc {
ServiceName : "org.signal.chat.purchase.Subscriptions" ,
HandlerType : ( * SubscriptionsServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "UpdateSubscriber" ,
Handler : _Subscriptions_UpdateSubscriber_Handler ,
} ,
{
MethodName : "DeleteSubscriber" ,
Handler : _Subscriptions_DeleteSubscriber_Handler ,
} ,
{
MethodName : "CreatePaymentMethod" ,
Handler : _Subscriptions_CreatePaymentMethod_Handler ,
} ,
{
MethodName : "CreatePayPalPaymentMethod" ,
Handler : _Subscriptions_CreatePayPalPaymentMethod_Handler ,
} ,
{
MethodName : "SetDefaultPaymentMethod" ,
Handler : _Subscriptions_SetDefaultPaymentMethod_Handler ,
} ,
{
MethodName : "SetSubscriptionLevel" ,
Handler : _Subscriptions_SetSubscriptionLevel_Handler ,
} ,
{
MethodName : "GetSubscriptionInformation" ,
Handler : _Subscriptions_GetSubscriptionInformation_Handler ,
} ,
{
2026-10-08 15:18:56 +03:00
MethodName : "GetReceiptCredential" ,
Handler : _Subscriptions_GetReceiptCredential_Handler ,
2026-09-05 00:57:28 +03:00
} ,
{
MethodName : "SetIapSubscription" ,
Handler : _Subscriptions_SetIapSubscription_Handler ,
} ,
{
MethodName : "GetBankMandate" ,
Handler : _Subscriptions_GetBankMandate_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "org/signal/chat/subscriptions.proto" ,
}