From 4659755553faac3d9884c99dd9b4dfb78624d479 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Tue, 23 Jan 2024 10:45:25 +0000 Subject: [PATCH] Update protos: nameservice/paymentservice --- .../nameserviceproto/nameservice.pb.go | 145 ++- .../nameserviceproto/protos/nameservice.proto | 25 +- .../mock/mock_paymentserviceclient.go | 28 - .../paymentserviceproto/paymentservice.pb.go | 880 ++++++++++++++++-- .../paymentservice_drpc.pb.go | 42 +- .../protos/.paymentservice.proto.swp | Bin 0 -> 12288 bytes .../protos/paymentservice.proto | 80 +- 7 files changed, 993 insertions(+), 207 deletions(-) create mode 100644 paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 5e2a81cc..6e095710 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -68,8 +68,9 @@ func (m *NameAvailableRequest) GetFullName() string { } type NameByAddressRequest struct { - // An Ethereum address that owns that name - OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // EOA -> SCW -> name + // A SCW Ethereum address that owns that name + OwnerScwEthAddress string `protobuf:"bytes,1,opt,name=ownerScwEthAddress,proto3" json:"ownerScwEthAddress,omitempty"` } func (m *NameByAddressRequest) Reset() { *m = NameByAddressRequest{} } @@ -105,27 +106,30 @@ func (m *NameByAddressRequest) XXX_DiscardUnknown() { var xxx_messageInfo_NameByAddressRequest proto.InternalMessageInfo -func (m *NameByAddressRequest) GetOwnerEthAddress() string { +func (m *NameByAddressRequest) GetOwnerScwEthAddress() string { if m != nil { - return m.OwnerEthAddress + return m.OwnerScwEthAddress } return "" } type NameAvailableResponse struct { Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` - // An Ethereum address that owns that name + // EOA -> SCW -> name // This field is non-empty only if name is "already registered" - OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + OwnerScwEthAddress string `protobuf:"bytes,2,opt,name=ownerScwEthAddress,proto3" json:"ownerScwEthAddress,omitempty"` + // This field is non-empty only if name is "already registered" + // TODO: + OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // A content hash attached to this name // This field is non-empty only if name is "already registered" - OwnerAnyAddress string `protobuf:"bytes,3,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` + OwnerAnyAddress string `protobuf:"bytes,4,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` // A SpaceID attached to this name // This field is non-empty only if name is "already registered" - SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - // doestn't work with marashalling/unmarshalling + SpaceId string `protobuf:"bytes,5,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + // doesn't work with marashalling/unmarshalling // google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; - NameExpires int64 `protobuf:"varint,5,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` + NameExpires int64 `protobuf:"varint,6,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` } func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } @@ -168,6 +172,13 @@ func (m *NameAvailableResponse) GetAvailable() bool { return false } +func (m *NameAvailableResponse) GetOwnerScwEthAddress() string { + if m != nil { + return m.OwnerScwEthAddress + } + return "" +} + func (m *NameAvailableResponse) GetOwnerEthAddress() string { if m != nil { return m.OwnerEthAddress @@ -260,28 +271,29 @@ func init() { } var fileDescriptor_06bca2ea4304f305 = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x31, 0x6f, 0xf2, 0x30, - 0x10, 0x8d, 0x3f, 0xe0, 0x2b, 0x5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0x79, 0x30, 0x6c, - 0xf4, 0x1e, 0xce, 0x23, 0x54, 0x76, 0xa5, 0x43, 0xba, 0x25, 0x37, 0x0b, 0x71, 0x27, 0x19, 0x23, - 0xe3, 0x84, 0x19, 0xa3, 0x01, 0x95, 0x59, 0xb0, 0x94, 0x9e, 0x19, 0x21, 0x09, 0x28, 0x85, 0xf2, - 0x81, 0x6d, 0x34, 0xeb, 0xf3, 0x60, 0x43, 0xa0, 0xe2, 0xc8, 0xb5, 0x54, 0x74, 0x08, 0xf5, 0xb1, - 0x3a, 0x73, 0x85, 0x36, 0x7b, 0x45, 0xcb, 0x69, 0x5d, 0xf7, 0x0a, 0xcd, 0xe3, 0x16, 0x7d, 0x80, - 0xab, 0x47, 0x8c, 0xcf, 0x34, 0x99, 0x22, 0xf9, 0x6d, 0x99, 0x22, 0xbf, 0xa4, 0x73, 0x6b, 0x78, - 0xf7, 0xb9, 0x63, 0x64, 0xbb, 0x63, 0xe4, 0x7b, 0xc7, 0xc8, 0x66, 0xcf, 0xac, 0xed, 0x9e, 0x59, - 0x5f, 0x7b, 0x66, 0x3d, 0xb7, 0xff, 0x7a, 0x64, 0x93, 0xff, 0xfa, 0x77, 0xf3, 0x13, 0x00, 0x00, - 0xff, 0xff, 0xe0, 0x5b, 0xc6, 0xb3, 0x8b, 0x02, 0x00, 0x00, + // 343 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4d, 0x4f, 0xc2, 0x40, + 0x10, 0xed, 0xca, 0x87, 0x30, 0x1e, 0x30, 0x1b, 0x30, 0x0d, 0x21, 0x0d, 0xe9, 0x89, 0x53, 0x49, + 0x30, 0x7a, 0x2f, 0x06, 0x0d, 0x17, 0x0f, 0xf5, 0xe6, 0x6d, 0xa1, 0x43, 0x24, 0x29, 0xdb, 0xda, + 0x2d, 0x20, 0xff, 0x82, 0x9f, 0xe5, 0x91, 0xa3, 0x47,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, 0xab, + 0x50, 0x18, 0x85, 0x53, 0xee, 0x2b, 0xc9, 0xbb, 0x80, 0x52, 0xc8, 0x6f, 0xab, 0x95, 0x40, 0x79, + 0xee, 0x2c, 0x09, 0x14, 0x5c, 0xbe, 0xe0, 0x82, 0x76, 0xa1, 0xd2, 0x17, 0x47, 0x2e, 0xd2, 0x9a, + 0x93, 0xb5, 0xd2, 0xfa, 0x8d, 0x93, 0x69, 0xb6, 0x6d, 0xd0, 0x07, 0xb8, 0x7e, 0xc2, 0xe4, 0xe8, + 0x4e, 0xaa, 0xc9, 0xe9, 0x8e, 0x55, 0x93, 0x3f, 0x57, 0xb7, 0x8d, 0xee, 0xfd, 0xe7, 0xda, 0x22, + 0xab, 0xb5, 0x45, 0xbe, 0xd7, 0x16, 0x59, 0x6e, 0x2c, 0x63, 0xb5, 0xb1, 0x8c, 0xaf, 0x8d, 0x65, + 0xbc, 0x36, 0xfe, 0x7b, 0x9a, 0x83, 0xa2, 0xfc, 0xdd, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xed, + 0x14, 0xb9, 0xb1, 0xc1, 0x02, 0x00, 0x00, } func (m *NameAvailableRequest) Marshal() (dAtA []byte, err error) { @@ -334,10 +346,10 @@ func (m *NameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + if len(m.OwnerScwEthAddress) > 0 { + i -= len(m.OwnerScwEthAddress) + copy(dAtA[i:], m.OwnerScwEthAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddress))) i-- dAtA[i] = 0xa } @@ -367,27 +379,34 @@ func (m *NameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.NameExpires != 0 { i = encodeVarintNameservice(dAtA, i, uint64(m.NameExpires)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x30 } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) i = encodeVarintNameservice(dAtA, i, uint64(len(m.SpaceId))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if len(m.OwnerAnyAddress) > 0 { i -= len(m.OwnerAnyAddress) copy(dAtA[i:], m.OwnerAnyAddress) i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerAnyAddress))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.OwnerEthAddress) > 0 { i -= len(m.OwnerEthAddress) copy(dAtA[i:], m.OwnerEthAddress) i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerEthAddress))) i-- + dAtA[i] = 0x1a + } + if len(m.OwnerScwEthAddress) > 0 { + i -= len(m.OwnerScwEthAddress) + copy(dAtA[i:], m.OwnerScwEthAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddress))) + i-- dAtA[i] = 0x12 } if m.Available { @@ -473,7 +492,7 @@ func (m *NameByAddressRequest) Size() (n int) { } var l int _ = l - l = len(m.OwnerEthAddress) + l = len(m.OwnerScwEthAddress) if l > 0 { n += 1 + l + sovNameservice(uint64(l)) } @@ -489,6 +508,10 @@ func (m *NameAvailableResponse) Size() (n int) { if m.Available { n += 2 } + l = len(m.OwnerScwEthAddress) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } l = len(m.OwnerEthAddress) if l > 0 { n += 1 + l + sovNameservice(uint64(l)) @@ -642,7 +665,7 @@ func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -670,7 +693,7 @@ func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -743,6 +766,38 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.Available = bool(v != 0) case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) } @@ -774,7 +829,7 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) } @@ -806,7 +861,7 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) } @@ -838,7 +893,7 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NameExpires", wireType) } diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index 778e46e4..6782c813 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -9,28 +9,33 @@ message NameAvailableRequest { } message NameByAddressRequest { - // An Ethereum address that owns that name - string ownerEthAddress = 1; + // EOA -> SCW -> name + // A SCW Ethereum address that owns that name + string ownerScwEthAddress = 1; } message NameAvailableResponse { bool available = 1; - // An Ethereum address that owns that name + // EOA -> SCW -> name // This field is non-empty only if name is "already registered" - string ownerEthAddress = 2; + string ownerScwEthAddress = 2; + + // This field is non-empty only if name is "already registered" + // TODO: + string ownerEthAddress = 3; // A content hash attached to this name // This field is non-empty only if name is "already registered" - string ownerAnyAddress = 3; + string ownerAnyAddress = 4; // A SpaceID attached to this name // This field is non-empty only if name is "already registered" - string spaceId = 4; + string spaceId = 5; - // doestn't work with marashalling/unmarshalling + // doesn't work with marashalling/unmarshalling //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; - int64 nameExpires = 5; + int64 nameExpires = 6; } message NameByAddressResponse { @@ -40,7 +45,9 @@ message NameByAddressResponse { } service Anyns { - // Check if name is free or get the attached information if not + // Lookup: name -> address rpc IsNameAvailable(NameAvailableRequest) returns (NameAvailableResponse) {} + + // Reverse lookup: address -> name rpc GetNameByAddress(NameByAddressRequest) returns (NameByAddressResponse) {} } diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index 97dbf63a..fbebff4d 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -55,20 +55,6 @@ func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuySubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).BuySubscription), ctx, in) } -// Close mocks base method. -func (m *MockAnyPpClientService) Close(ctx context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", ctx) - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockAnyPpClientServiceMockRecorder) Close(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAnyPpClientService)(nil).Close), ctx) -} - // GetSubscriptionStatus mocks base method. func (m *MockAnyPpClientService) GetSubscriptionStatus(ctx context.Context, in *paymentserviceproto.GetSubscriptionRequestSigned) (*paymentserviceproto.GetSubscriptionResponse, error) { m.ctrl.T.Helper() @@ -111,17 +97,3 @@ func (mr *MockAnyPpClientServiceMockRecorder) Name() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAnyPpClientService)(nil).Name)) } - -// Run mocks base method. -func (m *MockAnyPpClientService) Run(ctx context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", ctx) - ret0, _ := ret[0].(error) - return ret0 -} - -// Run indicates an expected call of Run. -func (mr *MockAnyPpClientServiceMockRecorder) Run(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockAnyPpClientService)(nil).Run), ctx) -} diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index d9ecf61c..047a6104 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -25,24 +25,24 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SubscriptionTier int32 const ( - SubscriptionTier_Tier_Unknown SubscriptionTier = 0 - SubscriptionTier_Tier_Friend SubscriptionTier = 1 - SubscriptionTier_Tier_Supporter1Year SubscriptionTier = 2 - SubscriptionTier_Tier_Patron1Year SubscriptionTier = 3 + SubscriptionTier_TierUnknown SubscriptionTier = 0 + SubscriptionTier_TierFriend SubscriptionTier = 1 + SubscriptionTier_TierSupporter1Year SubscriptionTier = 2 + SubscriptionTier_TierPatron1Year SubscriptionTier = 3 ) var SubscriptionTier_name = map[int32]string{ - 0: "Tier_Unknown", - 1: "Tier_Friend", - 2: "Tier_Supporter1Year", - 3: "Tier_Patron1Year", + 0: "TierUnknown", + 1: "TierFriend", + 2: "TierSupporter1Year", + 3: "TierPatron1Year", } var SubscriptionTier_value = map[string]int32{ - "Tier_Unknown": 0, - "Tier_Friend": 1, - "Tier_Supporter1Year": 2, - "Tier_Patron1Year": 3, + "TierUnknown": 0, + "TierFriend": 1, + "TierSupporter1Year": 2, + "TierPatron1Year": 3, } func (x SubscriptionTier) String() string { @@ -56,27 +56,24 @@ func (SubscriptionTier) EnumDescriptor() ([]byte, []int) { type SubscriptionStatus int32 const ( - SubscriptionStatus_Status_Unknown SubscriptionStatus = 0 - SubscriptionStatus_Status_Pending SubscriptionStatus = 1 - SubscriptionStatus_Status_Active SubscriptionStatus = 2 - SubscriptionStatus_Status_Expired SubscriptionStatus = 3 - SubscriptionStatus_Status_Canceled SubscriptionStatus = 4 + SubscriptionStatus_StatusUnknown SubscriptionStatus = 0 + // payment is still pending + // this will be the status until the payment is confirmed or N is elapsed and no payment is received + // in the last case the subscription will switch to Status_Unknown or Status_Active + SubscriptionStatus_StatusPending SubscriptionStatus = 1 + SubscriptionStatus_StatusActive SubscriptionStatus = 2 ) var SubscriptionStatus_name = map[int32]string{ - 0: "Status_Unknown", - 1: "Status_Pending", - 2: "Status_Active", - 3: "Status_Expired", - 4: "Status_Canceled", + 0: "StatusUnknown", + 1: "StatusPending", + 2: "StatusActive", } var SubscriptionStatus_value = map[string]int32{ - "Status_Unknown": 0, - "Status_Pending": 1, - "Status_Active": 2, - "Status_Expired": 3, - "Status_Canceled": 4, + "StatusUnknown": 0, + "StatusPending": 1, + "StatusActive": 2, } func (x SubscriptionStatus) String() string { @@ -90,24 +87,24 @@ func (SubscriptionStatus) EnumDescriptor() ([]byte, []int) { type PaymentMethod int32 const ( - PaymentMethod_Method_Card PaymentMethod = 0 - PaymentMethod_Method_Crypto PaymentMethod = 1 - PaymentMethod_Method_ApplePay PaymentMethod = 2 - PaymentMethod_Method_GooglePay PaymentMethod = 3 + PaymentMethod_MethodCard PaymentMethod = 0 + PaymentMethod_MethodCrypto PaymentMethod = 1 + PaymentMethod_MethodApplePay PaymentMethod = 2 + PaymentMethod_MethodGooglePay PaymentMethod = 3 ) var PaymentMethod_name = map[int32]string{ - 0: "Method_Card", - 1: "Method_Crypto", - 2: "Method_ApplePay", - 3: "Method_GooglePay", + 0: "MethodCard", + 1: "MethodCrypto", + 2: "MethodApplePay", + 3: "MethodGooglePay", } var PaymentMethod_value = map[string]int32{ - "Method_Card": 0, - "Method_Crypto": 1, - "Method_ApplePay": 2, - "Method_GooglePay": 3, + "MethodCard": 0, + "MethodCrypto": 1, + "MethodApplePay": 2, + "MethodGooglePay": 3, } func (x PaymentMethod) String() string { @@ -232,6 +229,9 @@ type GetSubscriptionResponse struct { NextTier SubscriptionTier `protobuf:"varint,6,opt,name=nextTier,proto3,enum=SubscriptionTier" json:"nextTier,omitempty"` NextTierEnds uint64 `protobuf:"varint,7,opt,name=nextTierEnds,proto3" json:"nextTierEnds,omitempty"` PaymentMethod PaymentMethod `protobuf:"varint,8,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` + // if name was requested - it will be here + // seeBuySubscriptionRequest.requestedAnyName field + RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` } func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} } @@ -271,14 +271,14 @@ func (m *GetSubscriptionResponse) GetTier() SubscriptionTier { if m != nil { return m.Tier } - return SubscriptionTier_Tier_Unknown + return SubscriptionTier_TierUnknown } func (m *GetSubscriptionResponse) GetStatus() SubscriptionStatus { if m != nil { return m.Status } - return SubscriptionStatus_Status_Unknown + return SubscriptionStatus_StatusUnknown } func (m *GetSubscriptionResponse) GetDateStarted() uint64 { @@ -306,7 +306,7 @@ func (m *GetSubscriptionResponse) GetNextTier() SubscriptionTier { if m != nil { return m.NextTier } - return SubscriptionTier_Tier_Unknown + return SubscriptionTier_TierUnknown } func (m *GetSubscriptionResponse) GetNextTierEnds() uint64 { @@ -320,22 +320,31 @@ func (m *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod { if m != nil { return m.PaymentMethod } - return PaymentMethod_Method_Card + return PaymentMethod_MethodCard +} + +func (m *GetSubscriptionResponse) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" } // 2 type BuySubscriptionRequest struct { // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" - OwnerAnyID string `protobuf:"bytes,1,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` - // this is the owner's ETH main EOA (External Owned Account) address - // - // not AccountAbstraction's SCW (Smart Contract Wallet) address! - // + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + // this is the owner's ETH main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" - // this is required to reserve a name for the owner OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` RequestedTier SubscriptionTier `protobuf:"varint,3,opt,name=requestedTier,proto3,enum=SubscriptionTier" json:"requestedTier,omitempty"` PaymentMethod PaymentMethod `protobuf:"varint,4,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` + // this is just to store the requested name in the DB + // and then you will be able to retrieve it via GetSubscriptionRequest + // PP won't register the name in NS! + RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` } func (m *BuySubscriptionRequest) Reset() { *m = BuySubscriptionRequest{} } @@ -371,9 +380,9 @@ func (m *BuySubscriptionRequest) XXX_DiscardUnknown() { var xxx_messageInfo_BuySubscriptionRequest proto.InternalMessageInfo -func (m *BuySubscriptionRequest) GetOwnerAnyID() string { +func (m *BuySubscriptionRequest) GetOwnerAnyId() string { if m != nil { - return m.OwnerAnyID + return m.OwnerAnyId } return "" } @@ -389,14 +398,21 @@ func (m *BuySubscriptionRequest) GetRequestedTier() SubscriptionTier { if m != nil { return m.RequestedTier } - return SubscriptionTier_Tier_Unknown + return SubscriptionTier_TierUnknown } func (m *BuySubscriptionRequest) GetPaymentMethod() PaymentMethod { if m != nil { return m.PaymentMethod } - return PaymentMethod_Method_Card + return PaymentMethod_MethodCard +} + +func (m *BuySubscriptionRequest) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" } type BuySubscriptionRequestSigned struct { @@ -499,6 +515,151 @@ func (m *BuySubscriptionResponse) GetPaymentUrl() string { return "" } +type GetSubscriptionPortalLinkRequest struct { + // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` +} + +func (m *GetSubscriptionPortalLinkRequest) Reset() { *m = GetSubscriptionPortalLinkRequest{} } +func (m *GetSubscriptionPortalLinkRequest) String() string { return proto.CompactTextString(m) } +func (*GetSubscriptionPortalLinkRequest) ProtoMessage() {} +func (*GetSubscriptionPortalLinkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{6} +} +func (m *GetSubscriptionPortalLinkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetSubscriptionPortalLinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetSubscriptionPortalLinkRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetSubscriptionPortalLinkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSubscriptionPortalLinkRequest.Merge(m, src) +} +func (m *GetSubscriptionPortalLinkRequest) XXX_Size() int { + return m.Size() +} +func (m *GetSubscriptionPortalLinkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetSubscriptionPortalLinkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSubscriptionPortalLinkRequest proto.InternalMessageInfo + +func (m *GetSubscriptionPortalLinkRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +type GetSubscriptionPortalLinkRequestSigned struct { + // GetSubscriptionPortalLinkRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *GetSubscriptionPortalLinkRequestSigned) Reset() { + *m = GetSubscriptionPortalLinkRequestSigned{} +} +func (m *GetSubscriptionPortalLinkRequestSigned) String() string { return proto.CompactTextString(m) } +func (*GetSubscriptionPortalLinkRequestSigned) ProtoMessage() {} +func (*GetSubscriptionPortalLinkRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{7} +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.Merge(m, src) +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned proto.InternalMessageInfo + +func (m *GetSubscriptionPortalLinkRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *GetSubscriptionPortalLinkRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type GetSubscriptionPortalLinkResponse struct { + PortalUrl string `protobuf:"bytes,1,opt,name=portalUrl,proto3" json:"portalUrl,omitempty"` +} + +func (m *GetSubscriptionPortalLinkResponse) Reset() { *m = GetSubscriptionPortalLinkResponse{} } +func (m *GetSubscriptionPortalLinkResponse) String() string { return proto.CompactTextString(m) } +func (*GetSubscriptionPortalLinkResponse) ProtoMessage() {} +func (*GetSubscriptionPortalLinkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{8} +} +func (m *GetSubscriptionPortalLinkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetSubscriptionPortalLinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetSubscriptionPortalLinkResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetSubscriptionPortalLinkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSubscriptionPortalLinkResponse.Merge(m, src) +} +func (m *GetSubscriptionPortalLinkResponse) XXX_Size() int { + return m.Size() +} +func (m *GetSubscriptionPortalLinkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetSubscriptionPortalLinkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSubscriptionPortalLinkResponse proto.InternalMessageInfo + +func (m *GetSubscriptionPortalLinkResponse) GetPortalUrl() string { + if m != nil { + return m.PortalUrl + } + return "" +} + func init() { proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value) @@ -509,6 +670,9 @@ func init() { proto.RegisterType((*BuySubscriptionRequest)(nil), "BuySubscriptionRequest") proto.RegisterType((*BuySubscriptionRequestSigned)(nil), "BuySubscriptionRequestSigned") proto.RegisterType((*BuySubscriptionResponse)(nil), "BuySubscriptionResponse") + proto.RegisterType((*GetSubscriptionPortalLinkRequest)(nil), "GetSubscriptionPortalLinkRequest") + proto.RegisterType((*GetSubscriptionPortalLinkRequestSigned)(nil), "GetSubscriptionPortalLinkRequestSigned") + proto.RegisterType((*GetSubscriptionPortalLinkResponse)(nil), "GetSubscriptionPortalLinkResponse") } func init() { @@ -516,48 +680,52 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 647 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x51, 0x4b, 0x1b, 0x4b, - 0x14, 0xc7, 0x77, 0x93, 0x5c, 0x8d, 0x47, 0x93, 0xac, 0xa3, 0x57, 0x17, 0xd1, 0x25, 0x2c, 0x5c, - 0x08, 0x5e, 0xee, 0xca, 0xb5, 0x85, 0xb6, 0x50, 0x0a, 0xd1, 0x5a, 0x29, 0xb4, 0x10, 0x36, 0x55, - 0x68, 0x1f, 0x2a, 0x6b, 0xe6, 0x10, 0x97, 0xa6, 0x33, 0xdb, 0x99, 0x59, 0x75, 0xbf, 0x45, 0x3f, - 0x4e, 0x3f, 0x42, 0x1f, 0xed, 0x4b, 0xe9, 0x63, 0xd1, 0x2f, 0x52, 0x76, 0x76, 0xa3, 0x9b, 0xc4, - 0xd8, 0xd2, 0xbe, 0xec, 0xce, 0xf9, 0x9d, 0x33, 0xff, 0x99, 0xff, 0xcc, 0x61, 0xe0, 0x49, 0x14, - 0x24, 0xef, 0x91, 0x29, 0x89, 0xe2, 0x34, 0xec, 0xe1, 0xd6, 0x68, 0x18, 0x09, 0xae, 0xf8, 0x96, - 0xfe, 0xca, 0xb1, 0x94, 0xa7, 0xa9, 0xfb, 0x10, 0x56, 0xf6, 0x51, 0x75, 0xe3, 0x63, 0xd9, 0x13, - 0x61, 0xa4, 0x42, 0xce, 0x7c, 0xfc, 0x10, 0xa3, 0x54, 0xc4, 0x01, 0xe0, 0x67, 0x0c, 0x45, 0x9b, - 0x25, 0xcf, 0x9f, 0xda, 0x66, 0xd3, 0x6c, 0xcd, 0xf9, 0x05, 0xe2, 0x1e, 0xc2, 0xfa, 0xed, 0x33, - 0xbb, 0x61, 0x9f, 0x21, 0x25, 0x36, 0xcc, 0x46, 0x41, 0x32, 0xe0, 0x01, 0xd5, 0x93, 0x17, 0xfc, - 0x61, 0x48, 0xd6, 0x61, 0x4e, 0x86, 0x7d, 0x16, 0xa8, 0x58, 0xa0, 0x5d, 0xd2, 0xb9, 0x1b, 0xe0, - 0x7e, 0x2d, 0xc1, 0xea, 0x84, 0xb0, 0x8c, 0x38, 0x93, 0x48, 0xfe, 0x81, 0x8a, 0x0a, 0x51, 0x68, - 0xc1, 0xfa, 0xf6, 0xa2, 0x57, 0x2c, 0x7a, 0x15, 0xa2, 0xf0, 0x75, 0x9a, 0xfc, 0x0b, 0x33, 0x52, - 0x05, 0x2a, 0x96, 0x5a, 0xbd, 0xbe, 0xbd, 0x34, 0x52, 0xd8, 0xd5, 0x29, 0x3f, 0x2f, 0x21, 0x4d, - 0x98, 0xa7, 0x81, 0xc2, 0xae, 0x0a, 0x84, 0x42, 0x6a, 0x97, 0x9b, 0x66, 0xab, 0xe2, 0x17, 0x11, - 0x59, 0x83,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 0x10, 0x56, 0x89, 0x2c, 0x83, 0xa5, - 0x13, 0x9d, 0x40, 0x09, 0xce, 0x32, 0x5a, 0xde, 0x3c, 0x07, 0x32, 0xd9, 0xd3, 0x84, 0x40, 0x3d, - 0x1b, 0x15, 0x56, 0xba, 0x61, 0x1d, 0x64, 0x34, 0x64, 0x7d, 0xcb, 0x24, 0x8b, 0x50, 0xcb, 0x59, - 0xbb, 0xa7, 0xc2, 0x53, 0xb4, 0x4a, 0x85, 0xb2, 0xbd, 0xf3, 0x28, 0x14, 0x48, 0xad, 0x32, 0x59, - 0x82, 0x46, 0xce, 0x76, 0x03, 0xd6, 0xc3, 0x01, 0x52, 0xab, 0xb2, 0xf9, 0x16, 0x6a, 0x23, 0x57, - 0x92, 0x5a, 0xc9, 0x46, 0x47, 0xbb, 0x81, 0xa0, 0x96, 0x91, 0xaa, 0x0f, 0x81, 0x48, 0x22, 0xc5, - 0x2d, 0x33, 0x55, 0xca, 0x51, 0x3b, 0x8a, 0x06, 0xd8, 0x09, 0x92, 0xcc, 0x59, 0x0e, 0xf7, 0x39, - 0xef, 0x67, 0xb4, 0xbc, 0xfd, 0xc9, 0x84, 0xe5, 0x36, 0x4b, 0xf2, 0x35, 0x3a, 0x82, 0xf7, 0x50, - 0xca, 0x90, 0xf5, 0x89, 0x0f, 0x7f, 0x8f, 0xbd, 0x0b, 0xb9, 0xeb, 0x0d, 0xef, 0xae, 0x87, 0x68, - 0xcd, 0xf6, 0xa6, 0x3c, 0x27, 0xae, 0x41, 0x5e, 0x40, 0x63, 0xec, 0x9e, 0xc9, 0x86, 0x77, 0x57, - 0x47, 0xad, 0xd9, 0xde, 0x94, 0xc6, 0x70, 0x8d, 0x9d, 0xc7, 0x9f, 0x2f, 0x1d, 0xf3, 0xe2, 0xd2, - 0x31, 0xbf, 0x5f, 0x3a, 0xe6, 0xc7, 0x2b, 0xc7, 0xb8, 0xb8, 0x72, 0x8c, 0x6f, 0x57, 0x8e, 0xf1, - 0xc6, 0xfd, 0xf9, 0x33, 0x7d, 0x3c, 0xa3, 0x7f, 0xf7, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, 0xda, - 0x2c, 0x8d, 0x51, 0xd3, 0x05, 0x00, 0x00, + // 707 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x5f, 0x4f, 0xd3, 0x5e, + 0x18, 0xc7, 0xdb, 0x6d, 0xc0, 0xf6, 0xc0, 0xb6, 0x72, 0xf8, 0xfd, 0xa0, 0x2e, 0xa3, 0x99, 0x4d, + 0xd4, 0x65, 0xc6, 0x12, 0xd1, 0x44, 0x4d, 0x8c, 0x49, 0x51, 0x24, 0x26, 0x68, 0x96, 0x4e, 0x48, + 0xe4, 0x8a, 0xb2, 0x9e, 0x8c, 0xca, 0x38, 0xa7, 0x9e, 0x73, 0x0a, 0xf6, 0xd6, 0x57, 0xe0, 0x8b, + 0xf0, 0xc5, 0x78, 0xc9, 0xa5, 0x97, 0x06, 0x5e, 0x87, 0x89, 0xe9, 0x69, 0xd9, 0x5f, 0xc6, 0x88, + 0xdc, 0xac, 0x7d, 0x3e, 0xe7, 0x39, 0xcf, 0x9f, 0xf3, 0x7c, 0x7b, 0x06, 0xaf, 0x02, 0x37, 0x3a, + 0xc6, 0x44, 0x70, 0xcc, 0x4e, 0xfc, 0x36, 0x5e, 0x1b, 0x36, 0x03, 0x46, 0x05, 0x5d, 0x93, 0xbf, + 0x7c, 0x64, 0xc9, 0x92, 0xd4, 0x7c, 0x0e, 0xcb, 0x5b, 0x58, 0xb4, 0xc2, 0x03, 0xde, 0x66, 0x7e, + 0x20, 0x7c, 0x4a, 0x1c, 0xfc, 0x25, 0xc4, 0x5c, 0x20, 0x03, 0x80, 0x9e, 0x12, 0xcc, 0x6c, 0x12, + 0xbd, 0x7b, 0xa3, 0xab, 0x35, 0xb5, 0x5e, 0x70, 0x06, 0x88, 0xb9, 0x0b, 0x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b, 0x4c, + 0x07, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -647,6 +815,13 @@ func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x4a + } if m.PaymentMethod != 0 { i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) i-- @@ -715,6 +890,13 @@ func (m *BuySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x2a + } if m.PaymentMethod != 0 { i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) i-- @@ -732,10 +914,10 @@ func (m *BuySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - if len(m.OwnerAnyID) > 0 { - i -= len(m.OwnerAnyID) - copy(dAtA[i:], m.OwnerAnyID) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyID))) + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) i-- dAtA[i] = 0xa } @@ -809,6 +991,103 @@ func (m *BuySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *GetSubscriptionPortalLinkRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionPortalLinkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionPortalLinkRequestSigned) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionPortalLinkRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionPortalLinkResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionPortalLinkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PortalUrl) > 0 { + i -= len(m.PortalUrl) + copy(dAtA[i:], m.PortalUrl) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.PortalUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintPaymentservice(dAtA []byte, offset int, v uint64) int { offset -= sovPaymentservice(v) base := offset @@ -880,6 +1159,10 @@ func (m *GetSubscriptionResponse) Size() (n int) { if m.PaymentMethod != 0 { n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } return n } @@ -889,7 +1172,7 @@ func (m *BuySubscriptionRequest) Size() (n int) { } var l int _ = l - l = len(m.OwnerAnyID) + l = len(m.OwnerAnyId) if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } @@ -903,6 +1186,10 @@ func (m *BuySubscriptionRequest) Size() (n int) { if m.PaymentMethod != 0 { n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } return n } @@ -936,6 +1223,49 @@ func (m *BuySubscriptionResponse) Size() (n int) { return n } +func (m *GetSubscriptionPortalLinkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *GetSubscriptionPortalLinkRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *GetSubscriptionPortalLinkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortalUrl) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + func sovPaymentservice(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1324,6 +1654,38 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { break } } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) @@ -1376,7 +1738,7 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1404,7 +1766,7 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1476,6 +1838,38 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) @@ -1697,6 +2091,288 @@ func (m *BuySubscriptionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *GetSubscriptionPortalLinkRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionPortalLinkRequestSigned) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionPortalLinkResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortalUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortalUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipPaymentservice(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index f4105fb3..bef30a6a 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -42,6 +42,7 @@ type DRPCAnyPaymentProcessingClient interface { GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) } type drpcAnyPaymentProcessingClient struct { @@ -72,9 +73,19 @@ func (c *drpcAnyPaymentProcessingClient) BuySubscription(ctx context.Context, in return out, nil } +func (c *drpcAnyPaymentProcessingClient) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { + out := new(GetSubscriptionPortalLinkResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) } type DRPCAnyPaymentProcessingUnimplementedServer struct{} @@ -87,9 +98,13 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) BuySubscription(context.Co return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 2 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 3 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -111,6 +126,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*BuySubscriptionRequestSigned), ) }, DRPCAnyPaymentProcessingServer.BuySubscription, true + case 2: + return "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + GetSubscriptionPortalLink( + ctx, + in1.(*GetSubscriptionPortalLinkRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.GetSubscriptionPortalLink, true default: return "", nil, nil, nil, false } @@ -151,3 +175,19 @@ func (x *drpcAnyPaymentProcessing_BuySubscriptionStream) SendAndClose(m *BuySubs } return x.CloseSend() } + +type DRPCAnyPaymentProcessing_GetSubscriptionPortalLinkStream interface { + drpc.Stream + SendAndClose(*GetSubscriptionPortalLinkResponse) error +} + +type drpcAnyPaymentProcessing_GetSubscriptionPortalLinkStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_GetSubscriptionPortalLinkStream) SendAndClose(m *GetSubscriptionPortalLinkResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp b/paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp new file mode 100644 index 0000000000000000000000000000000000000000..8096755cbda200881188005aad860090fa642c61 GIT binary patch literal 12288 zcmeI2O>87b6~`-CAR!?TB@ze;#M_C)+9LMYGai4foG@OS&1z$NvSY`I5VC5zYdjtI zbT!@8wugx1kVRbK0sfO>TUt zt^IkntE;PC{p)@7>{e&y@hcm&I9(I?xmSp}-`-GvdHLMApDYMrbTl|nk>OkK_S1~e zGo9Ly-m2CIQ>{c#huV|j_%qKG16E};FoRg}=Ttg~ylN~5eaw`q1CbC>1CbC>1CbC>1Cb zC>8jBRlvlziD$96+w%o}DgV4}>@&YCKS~8k1xf`<1xf`<1xf`<1xf`<1xf`<1xf`< z1^x#WkiHP#huuHqe*nP${}uGV0W`sb z;4|PK?-$|?@K^8}_%-+j2tgY>23lYi{ONr{yb8V!o&!Db2)F<$;C}G@Iot!!fKLGd zZeYK8&wo(-!w;JOYk$5hh?3Z&)ojqtI;ocgu?ciEF?M}TeKAw1X$Sj}@+T=#CQG7} zPIpUVoL5nk^fV7#tWK1_C=>?K!KAxA&>49$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