mirror of
https://github.com/mautrix/signal.git
synced 2026-09-17 08:12:05 -04:00
373 lines
14 KiB
Go
373 lines
14 KiB
Go
|
|
//
|
||
|
|
// Copyright 2026 Signal Messenger, LLC
|
||
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||
|
|
|
||
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
|
|
// versions:
|
||
|
|
// protoc-gen-go v1.36.11
|
||
|
|
// protoc v7.34.1
|
||
|
|
// source: org/signal/chat/donations.proto
|
||
|
|
|
||
|
|
package donations
|
||
|
|
|
||
|
|
import (
|
||
|
|
errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors"
|
||
|
|
_ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require"
|
||
|
|
_ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag"
|
||
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||
|
|
reflect "reflect"
|
||
|
|
sync "sync"
|
||
|
|
unsafe "unsafe"
|
||
|
|
)
|
||
|
|
|
||
|
|
const (
|
||
|
|
// Verify that this generated code is sufficiently up-to-date.
|
||
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||
|
|
)
|
||
|
|
|
||
|
|
type RedeemReceiptRequest struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// Presentation of the ZK receipt acquired when the subscription was created
|
||
|
|
ReceiptCredentialPresentation []byte `protobuf:"bytes,1,opt,name=receiptCredentialPresentation,proto3" json:"receiptCredentialPresentation,omitempty"`
|
||
|
|
// If true, the corresponding badge should be visible on the profile
|
||
|
|
Visible bool `protobuf:"varint,2,opt,name=visible,proto3" json:"visible,omitempty"`
|
||
|
|
// If true, and the new badge is visible, it should be the primary badge on the profile
|
||
|
|
Primary bool `protobuf:"varint,3,opt,name=primary,proto3" json:"primary,omitempty"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptRequest) Reset() {
|
||
|
|
*x = RedeemReceiptRequest{}
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[0]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptRequest) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*RedeemReceiptRequest) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptRequest) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[0]
|
||
|
|
if x != nil {
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
if ms.LoadMessageInfo() == nil {
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
return ms
|
||
|
|
}
|
||
|
|
return mi.MessageOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Deprecated: Use RedeemReceiptRequest.ProtoReflect.Descriptor instead.
|
||
|
|
func (*RedeemReceiptRequest) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{0}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptRequest) GetReceiptCredentialPresentation() []byte {
|
||
|
|
if x != nil {
|
||
|
|
return x.ReceiptCredentialPresentation
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptRequest) GetVisible() bool {
|
||
|
|
if x != nil {
|
||
|
|
return x.Visible
|
||
|
|
}
|
||
|
|
return false
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptRequest) GetPrimary() bool {
|
||
|
|
if x != nil {
|
||
|
|
return x.Primary
|
||
|
|
}
|
||
|
|
return false
|
||
|
|
}
|
||
|
|
|
||
|
|
type RedeemReceiptResponse struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// Types that are valid to be assigned to Response:
|
||
|
|
//
|
||
|
|
// *RedeemReceiptResponse_Success
|
||
|
|
// *RedeemReceiptResponse_FailedAuthentication
|
||
|
|
// *RedeemReceiptResponse_AlreadyRedeemed
|
||
|
|
Response isRedeemReceiptResponse_Response `protobuf_oneof:"response"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptResponse) Reset() {
|
||
|
|
*x = RedeemReceiptResponse{}
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[1]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptResponse) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*RedeemReceiptResponse) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptResponse) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[1]
|
||
|
|
if x != nil {
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
if ms.LoadMessageInfo() == nil {
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
return ms
|
||
|
|
}
|
||
|
|
return mi.MessageOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Deprecated: Use RedeemReceiptResponse.ProtoReflect.Descriptor instead.
|
||
|
|
func (*RedeemReceiptResponse) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{1}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptResponse) GetResponse() isRedeemReceiptResponse_Response {
|
||
|
|
if x != nil {
|
||
|
|
return x.Response
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptResponse) GetSuccess() *emptypb.Empty {
|
||
|
|
if x != nil {
|
||
|
|
if x, ok := x.Response.(*RedeemReceiptResponse_Success); ok {
|
||
|
|
return x.Success
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptResponse) GetFailedAuthentication() *errors.FailedZkAuthentication {
|
||
|
|
if x != nil {
|
||
|
|
if x, ok := x.Response.(*RedeemReceiptResponse_FailedAuthentication); ok {
|
||
|
|
return x.FailedAuthentication
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *RedeemReceiptResponse) GetAlreadyRedeemed() *errors.FailedPrecondition {
|
||
|
|
if x != nil {
|
||
|
|
if x, ok := x.Response.(*RedeemReceiptResponse_AlreadyRedeemed); ok {
|
||
|
|
return x.AlreadyRedeemed
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type isRedeemReceiptResponse_Response interface {
|
||
|
|
isRedeemReceiptResponse_Response()
|
||
|
|
}
|
||
|
|
|
||
|
|
type RedeemReceiptResponse_Success struct {
|
||
|
|
// The receipt was successfully redeemed
|
||
|
|
Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type RedeemReceiptResponse_FailedAuthentication struct {
|
||
|
|
// The provided presentation is invalid
|
||
|
|
FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type RedeemReceiptResponse_AlreadyRedeemed struct {
|
||
|
|
// The receipt was already redeemed for a different account
|
||
|
|
AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*RedeemReceiptResponse_Success) isRedeemReceiptResponse_Response() {}
|
||
|
|
|
||
|
|
func (*RedeemReceiptResponse_FailedAuthentication) isRedeemReceiptResponse_Response() {}
|
||
|
|
|
||
|
|
func (*RedeemReceiptResponse_AlreadyRedeemed) isRedeemReceiptResponse_Response() {}
|
||
|
|
|
||
|
|
type CreateDonationPermitRequest struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// a serialized libsignal DonationPermitRequest
|
||
|
|
DonationPermitRequest []byte `protobuf:"bytes,1,opt,name=donation_permit_request,json=donationPermitRequest,proto3" json:"donation_permit_request,omitempty"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitRequest) Reset() {
|
||
|
|
*x = CreateDonationPermitRequest{}
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[2]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitRequest) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*CreateDonationPermitRequest) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitRequest) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[2]
|
||
|
|
if x != nil {
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
if ms.LoadMessageInfo() == nil {
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
return ms
|
||
|
|
}
|
||
|
|
return mi.MessageOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Deprecated: Use CreateDonationPermitRequest.ProtoReflect.Descriptor instead.
|
||
|
|
func (*CreateDonationPermitRequest) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{2}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitRequest) GetDonationPermitRequest() []byte {
|
||
|
|
if x != nil {
|
||
|
|
return x.DonationPermitRequest
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type CreateDonationPermitResponse struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// a serialized libsignal DonationPermitResponse
|
||
|
|
DonationPermitResponse []byte `protobuf:"bytes,1,opt,name=donation_permit_response,json=donationPermitResponse,proto3" json:"donation_permit_response,omitempty"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitResponse) Reset() {
|
||
|
|
*x = CreateDonationPermitResponse{}
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[3]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitResponse) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*CreateDonationPermitResponse) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitResponse) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_donations_proto_msgTypes[3]
|
||
|
|
if x != nil {
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
if ms.LoadMessageInfo() == nil {
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
return ms
|
||
|
|
}
|
||
|
|
return mi.MessageOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Deprecated: Use CreateDonationPermitResponse.ProtoReflect.Descriptor instead.
|
||
|
|
func (*CreateDonationPermitResponse) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{3}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *CreateDonationPermitResponse) GetDonationPermitResponse() []byte {
|
||
|
|
if x != nil {
|
||
|
|
return x.DonationPermitResponse
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
var File_org_signal_chat_donations_proto protoreflect.FileDescriptor
|
||
|
|
|
||
|
|
const file_org_signal_chat_donations_proto_rawDesc = "" +
|
||
|
|
"\n" +
|
||
|
|
"\x1forg/signal/chat/donations.proto\x12\x19org.signal.chat.donations\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"\x98\x01\n" +
|
||
|
|
"\x14RedeemReceiptRequest\x12L\n" +
|
||
|
|
"\x1dreceiptCredentialPresentation\x18\x01 \x01(\fB\x06\xa2\x97\"\x02\xc9\x02R\x1dreceiptCredentialPresentation\x12\x18\n" +
|
||
|
|
"\avisible\x18\x02 \x01(\bR\avisible\x12\x18\n" +
|
||
|
|
"\aprimary\x18\x03 \x01(\bR\aprimary\"\xc9\x02\n" +
|
||
|
|
"\x15RedeemReceiptResponse\x122\n" +
|
||
|
|
"\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" +
|
||
|
|
"\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x12m\n" +
|
||
|
|
"\x10already_redeemed\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemedB\n" +
|
||
|
|
"\n" +
|
||
|
|
"\bresponse\"[\n" +
|
||
|
|
"\x1bCreateDonationPermitRequest\x12<\n" +
|
||
|
|
"\x17donation_permit_request\x18\x01 \x01(\fB\x04\x88\x97\"\x01R\x15donationPermitRequest\"X\n" +
|
||
|
|
"\x1cCreateDonationPermitResponse\x128\n" +
|
||
|
|
"\x18donation_permit_response\x18\x01 \x01(\fR\x16donationPermitResponse2\x93\x02\n" +
|
||
|
|
"\tDonations\x12t\n" +
|
||
|
|
"\rRedeemReceipt\x12/.org.signal.chat.donations.RedeemReceiptRequest\x1a0.org.signal.chat.donations.RedeemReceiptResponse\"\x00\x12\x89\x01\n" +
|
||
|
|
"\x14CreateDonationPermit\x126.org.signal.chat.donations.CreateDonationPermitRequest\x1a7.org.signal.chat.donations.CreateDonationPermitResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3"
|
||
|
|
|
||
|
|
var (
|
||
|
|
file_org_signal_chat_donations_proto_rawDescOnce sync.Once
|
||
|
|
file_org_signal_chat_donations_proto_rawDescData []byte
|
||
|
|
)
|
||
|
|
|
||
|
|
func file_org_signal_chat_donations_proto_rawDescGZIP() []byte {
|
||
|
|
file_org_signal_chat_donations_proto_rawDescOnce.Do(func() {
|
||
|
|
file_org_signal_chat_donations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_donations_proto_rawDesc), len(file_org_signal_chat_donations_proto_rawDesc)))
|
||
|
|
})
|
||
|
|
return file_org_signal_chat_donations_proto_rawDescData
|
||
|
|
}
|
||
|
|
|
||
|
|
var file_org_signal_chat_donations_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||
|
|
var file_org_signal_chat_donations_proto_goTypes = []any{
|
||
|
|
(*RedeemReceiptRequest)(nil), // 0: org.signal.chat.donations.RedeemReceiptRequest
|
||
|
|
(*RedeemReceiptResponse)(nil), // 1: org.signal.chat.donations.RedeemReceiptResponse
|
||
|
|
(*CreateDonationPermitRequest)(nil), // 2: org.signal.chat.donations.CreateDonationPermitRequest
|
||
|
|
(*CreateDonationPermitResponse)(nil), // 3: org.signal.chat.donations.CreateDonationPermitResponse
|
||
|
|
(*emptypb.Empty)(nil), // 4: google.protobuf.Empty
|
||
|
|
(*errors.FailedZkAuthentication)(nil), // 5: org.signal.chat.errors.FailedZkAuthentication
|
||
|
|
(*errors.FailedPrecondition)(nil), // 6: org.signal.chat.errors.FailedPrecondition
|
||
|
|
}
|
||
|
|
var file_org_signal_chat_donations_proto_depIdxs = []int32{
|
||
|
|
4, // 0: org.signal.chat.donations.RedeemReceiptResponse.success:type_name -> google.protobuf.Empty
|
||
|
|
5, // 1: org.signal.chat.donations.RedeemReceiptResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication
|
||
|
|
6, // 2: org.signal.chat.donations.RedeemReceiptResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition
|
||
|
|
0, // 3: org.signal.chat.donations.Donations.RedeemReceipt:input_type -> org.signal.chat.donations.RedeemReceiptRequest
|
||
|
|
2, // 4: org.signal.chat.donations.Donations.CreateDonationPermit:input_type -> org.signal.chat.donations.CreateDonationPermitRequest
|
||
|
|
1, // 5: org.signal.chat.donations.Donations.RedeemReceipt:output_type -> org.signal.chat.donations.RedeemReceiptResponse
|
||
|
|
3, // 6: org.signal.chat.donations.Donations.CreateDonationPermit:output_type -> org.signal.chat.donations.CreateDonationPermitResponse
|
||
|
|
5, // [5:7] is the sub-list for method output_type
|
||
|
|
3, // [3:5] is the sub-list for method input_type
|
||
|
|
3, // [3:3] is the sub-list for extension type_name
|
||
|
|
3, // [3:3] is the sub-list for extension extendee
|
||
|
|
0, // [0:3] is the sub-list for field type_name
|
||
|
|
}
|
||
|
|
|
||
|
|
func init() { file_org_signal_chat_donations_proto_init() }
|
||
|
|
func file_org_signal_chat_donations_proto_init() {
|
||
|
|
if File_org_signal_chat_donations_proto != nil {
|
||
|
|
return
|
||
|
|
}
|
||
|
|
file_org_signal_chat_donations_proto_msgTypes[1].OneofWrappers = []any{
|
||
|
|
(*RedeemReceiptResponse_Success)(nil),
|
||
|
|
(*RedeemReceiptResponse_FailedAuthentication)(nil),
|
||
|
|
(*RedeemReceiptResponse_AlreadyRedeemed)(nil),
|
||
|
|
}
|
||
|
|
type x struct{}
|
||
|
|
out := protoimpl.TypeBuilder{
|
||
|
|
File: protoimpl.DescBuilder{
|
||
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_donations_proto_rawDesc), len(file_org_signal_chat_donations_proto_rawDesc)),
|
||
|
|
NumEnums: 0,
|
||
|
|
NumMessages: 4,
|
||
|
|
NumExtensions: 0,
|
||
|
|
NumServices: 1,
|
||
|
|
},
|
||
|
|
GoTypes: file_org_signal_chat_donations_proto_goTypes,
|
||
|
|
DependencyIndexes: file_org_signal_chat_donations_proto_depIdxs,
|
||
|
|
MessageInfos: file_org_signal_chat_donations_proto_msgTypes,
|
||
|
|
}.Build()
|
||
|
|
File_org_signal_chat_donations_proto = out.File
|
||
|
|
file_org_signal_chat_donations_proto_goTypes = nil
|
||
|
|
file_org_signal_chat_donations_proto_depIdxs = nil
|
||
|
|
}
|