1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Add IsNameValid method

This commit is contained in:
Anton Akentev 2024-03-20 19:06:31 +00:00
parent 3727016677
commit 14cbcd82a0
5 changed files with 629 additions and 85 deletions

View file

@ -1,10 +1,6 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: paymentservice/paymentserviceclient/paymentserviceclient.go
//
// Generated by this command:
//
// mockgen -source paymentservice/paymentserviceclient/paymentserviceclient.go
//
// Package mock_paymentserviceclient is a generated GoMock package.
package mock_paymentserviceclient
@ -50,7 +46,7 @@ func (m *MockAnyPpClientService) BuySubscription(ctx context.Context, in *paymen
}
// BuySubscription indicates an expected call of BuySubscription.
func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuySubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).BuySubscription), ctx, in)
}
@ -65,7 +61,7 @@ func (m *MockAnyPpClientService) FinalizeSubscription(ctx context.Context, in *p
}
// FinalizeSubscription indicates an expected call of FinalizeSubscription.
func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeSubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).FinalizeSubscription), ctx, in)
}
@ -80,7 +76,7 @@ func (m *MockAnyPpClientService) GetAllTiers(ctx context.Context, in *paymentser
}
// GetAllTiers indicates an expected call of GetAllTiers.
func (mr *MockAnyPpClientServiceMockRecorder) GetAllTiers(ctx, in any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) GetAllTiers(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllTiers", reflect.TypeOf((*MockAnyPpClientService)(nil).GetAllTiers), ctx, in)
}
@ -95,7 +91,7 @@ func (m *MockAnyPpClientService) GetSubscriptionPortalLink(ctx context.Context,
}
// GetSubscriptionPortalLink indicates an expected call of GetSubscriptionPortalLink.
func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionPortalLink(ctx, in any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionPortalLink(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionPortalLink", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionPortalLink), ctx, in)
}
@ -110,7 +106,7 @@ func (m *MockAnyPpClientService) GetSubscriptionStatus(ctx context.Context, in *
}
// GetSubscriptionStatus indicates an expected call of GetSubscriptionStatus.
func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionStatus(ctx, in any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionStatus(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionStatus", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionStatus), ctx, in)
}
@ -125,7 +121,7 @@ func (m *MockAnyPpClientService) GetVerificationEmail(ctx context.Context, in *p
}
// GetVerificationEmail indicates an expected call of GetVerificationEmail.
func (mr *MockAnyPpClientServiceMockRecorder) GetVerificationEmail(ctx, in any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) GetVerificationEmail(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVerificationEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).GetVerificationEmail), ctx, in)
}
@ -139,11 +135,26 @@ func (m *MockAnyPpClientService) Init(a *app.App) error {
}
// Init indicates an expected call of Init.
func (mr *MockAnyPpClientServiceMockRecorder) Init(a any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) Init(a interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAnyPpClientService)(nil).Init), a)
}
// IsNameValid mocks base method.
func (m *MockAnyPpClientService) IsNameValid(ctx context.Context, in *paymentserviceproto.IsNameValidRequest) (*paymentserviceproto.IsNameValidResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsNameValid", ctx, in)
ret0, _ := ret[0].(*paymentserviceproto.IsNameValidResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IsNameValid indicates an expected call of IsNameValid.
func (mr *MockAnyPpClientServiceMockRecorder) IsNameValid(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNameValid", reflect.TypeOf((*MockAnyPpClientService)(nil).IsNameValid), ctx, in)
}
// Name mocks base method.
func (m *MockAnyPpClientService) Name() string {
m.ctrl.T.Helper()
@ -168,7 +179,7 @@ func (m *MockAnyPpClientService) VerifyEmail(ctx context.Context, in *paymentser
}
// VerifyEmail indicates an expected call of VerifyEmail.
func (mr *MockAnyPpClientServiceMockRecorder) VerifyEmail(ctx, in any) *gomock.Call {
func (mr *MockAnyPpClientServiceMockRecorder) VerifyEmail(ctx, in interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).VerifyEmail), ctx, in)
}

View file

@ -23,6 +23,7 @@ var log = logger.NewNamed(CName)
*/
type AnyPpClientService interface {
GetSubscriptionStatus(ctx context.Context, in *pp.GetSubscriptionRequestSigned) (out *pp.GetSubscriptionResponse, err error)
IsNameValid(ctx context.Context, in *pp.IsNameValidRequest) (out *pp.IsNameValidResponse, err error)
BuySubscription(ctx context.Context, in *pp.BuySubscriptionRequestSigned) (out *pp.BuySubscriptionResponse, err error)
GetSubscriptionPortalLink(ctx context.Context, in *pp.GetSubscriptionPortalLinkRequestSigned) (out *pp.GetSubscriptionPortalLinkResponse, err error)
GetVerificationEmail(ctx context.Context, in *pp.GetVerificationEmailRequestSigned) (out *pp.GetVerificationEmailResponse, err error)
@ -144,3 +145,13 @@ func (s *service) GetAllTiers(ctx context.Context, in *pp.GetTiersRequestSigned)
})
return
}
func (s *service) IsNameValid(ctx context.Context, in *pp.IsNameValidRequest) (out *pp.IsNameValidResponse, err error) {
err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error {
if out, err = cl.IsNameValid(ctx, in); err != nil {
return rpcerr.Unwrap(err)
}
return nil
})
return
}

View file

@ -146,6 +146,43 @@ func (PaymentMethod) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_4feb29dcc5ba50f6, []int{2}
}
type IsNameValidResponse_Code int32
const (
IsNameValidResponse_Valid IsNameValidResponse_Code = 0
IsNameValidResponse_NoDotAny IsNameValidResponse_Code = 1
IsNameValidResponse_TooShort IsNameValidResponse_Code = 2
IsNameValidResponse_TooLong IsNameValidResponse_Code = 3
IsNameValidResponse_HasInvalidChars IsNameValidResponse_Code = 4
IsNameValidResponse_TierFeatureNoName IsNameValidResponse_Code = 5
)
var IsNameValidResponse_Code_name = map[int32]string{
0: "Valid",
1: "NoDotAny",
2: "TooShort",
3: "TooLong",
4: "HasInvalidChars",
5: "TierFeatureNoName",
}
var IsNameValidResponse_Code_value = map[string]int32{
"Valid": 0,
"NoDotAny": 1,
"TooShort": 2,
"TooLong": 3,
"HasInvalidChars": 4,
"TierFeatureNoName": 5,
}
func (x IsNameValidResponse_Code) String() string {
return proto.EnumName(IsNameValidResponse_Code_name, int32(x))
}
func (IsNameValidResponse_Code) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_4feb29dcc5ba50f6, []int{19, 0}
}
type GetSubscriptionRequest struct {
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
// you can get it with Account().SignKey.GetPublic().Account()
@ -1161,10 +1198,115 @@ func (m *VerifyEmailRequestSigned) GetSignature() []byte {
return nil
}
type IsNameValidRequest struct {
RequestedTier int32 `protobuf:"varint,1,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"`
RequestedAnyName string `protobuf:"bytes,2,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"`
}
func (m *IsNameValidRequest) Reset() { *m = IsNameValidRequest{} }
func (m *IsNameValidRequest) String() string { return proto.CompactTextString(m) }
func (*IsNameValidRequest) ProtoMessage() {}
func (*IsNameValidRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4feb29dcc5ba50f6, []int{18}
}
func (m *IsNameValidRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *IsNameValidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_IsNameValidRequest.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 *IsNameValidRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_IsNameValidRequest.Merge(m, src)
}
func (m *IsNameValidRequest) XXX_Size() int {
return m.Size()
}
func (m *IsNameValidRequest) XXX_DiscardUnknown() {
xxx_messageInfo_IsNameValidRequest.DiscardUnknown(m)
}
var xxx_messageInfo_IsNameValidRequest proto.InternalMessageInfo
func (m *IsNameValidRequest) GetRequestedTier() int32 {
if m != nil {
return m.RequestedTier
}
return 0
}
func (m *IsNameValidRequest) GetRequestedAnyName() string {
if m != nil {
return m.RequestedAnyName
}
return ""
}
type IsNameValidResponse struct {
Code IsNameValidResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=IsNameValidResponse_Code" json:"code,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (m *IsNameValidResponse) Reset() { *m = IsNameValidResponse{} }
func (m *IsNameValidResponse) String() string { return proto.CompactTextString(m) }
func (*IsNameValidResponse) ProtoMessage() {}
func (*IsNameValidResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4feb29dcc5ba50f6, []int{19}
}
func (m *IsNameValidResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *IsNameValidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_IsNameValidResponse.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 *IsNameValidResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_IsNameValidResponse.Merge(m, src)
}
func (m *IsNameValidResponse) XXX_Size() int {
return m.Size()
}
func (m *IsNameValidResponse) XXX_DiscardUnknown() {
xxx_messageInfo_IsNameValidResponse.DiscardUnknown(m)
}
var xxx_messageInfo_IsNameValidResponse proto.InternalMessageInfo
func (m *IsNameValidResponse) GetCode() IsNameValidResponse_Code {
if m != nil {
return m.Code
}
return IsNameValidResponse_Valid
}
func (m *IsNameValidResponse) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func init() {
proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value)
proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value)
proto.RegisterEnum("PaymentMethod", PaymentMethod_name, PaymentMethod_value)
proto.RegisterEnum("IsNameValidResponse_Code", IsNameValidResponse_Code_name, IsNameValidResponse_Code_value)
proto.RegisterType((*GetSubscriptionRequest)(nil), "GetSubscriptionRequest")
proto.RegisterType((*GetSubscriptionRequestSigned)(nil), "GetSubscriptionRequestSigned")
proto.RegisterType((*GetSubscriptionResponse)(nil), "GetSubscriptionResponse")
@ -1183,6 +1325,8 @@ func init() {
proto.RegisterType((*VerifyEmailRequest)(nil), "VerifyEmailRequest")
proto.RegisterType((*VerifyEmailResponse)(nil), "VerifyEmailResponse")
proto.RegisterType((*VerifyEmailRequestSigned)(nil), "VerifyEmailRequestSigned")
proto.RegisterType((*IsNameValidRequest)(nil), "IsNameValidRequest")
proto.RegisterType((*IsNameValidResponse)(nil), "IsNameValidResponse")
}
func init() {
@ -1190,71 +1334,80 @@ func init() {
}
var fileDescriptor_4feb29dcc5ba50f6 = []byte{
// 1018 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6e, 0xe4, 0xc4,
0x13, 0x1e, 0x67, 0x66, 0xf2, 0xa7, 0xb2, 0x49, 0x9c, 0xca, 0x24, 0xeb, 0x9d, 0x4d, 0xac, 0xc4,
0xfa, 0xfd, 0x20, 0x0a, 0x92, 0x23, 0x96, 0x3d, 0x00, 0x42, 0x08, 0x27, 0x1b, 0xa2, 0x95, 0x96,
0xd5, 0xc8, 0xc9, 0x2e, 0x82, 0x3d, 0x80, 0x33, 0x2e, 0xb2, 0x26, 0x4e, 0xdb, 0x74, 0xb7, 0x37,
0x98, 0x17, 0x40, 0xdc, 0x90, 0x78, 0x24, 0x2e, 0x1c, 0xf7, 0xc8, 0x81, 0x03, 0x4a, 0x6e, 0x9c,
0x78, 0x04, 0xe4, 0xb6, 0x27, 0xe3, 0xc9, 0x78, 0x26, 0x61, 0x23, 0x2e, 0x99, 0xae, 0xaf, 0xbb,
0xca, 0x55, 0x5f, 0x95, 0xbf, 0x76, 0xe0, 0xe3, 0xd8, 0x4b, 0x4f, 0x89, 0x49, 0x41, 0xfc, 0x55,
0xd0, 0xa5, 0xed, 0x41, 0x33, 0xe6, 0x91, 0x8c, 0xb6, 0xd5, 0x5f, 0x71, 0x65, 0xcb, 0x56, 0x68,
0xfb, 0xd1, 0x9b, 0xfa, 0x7f, 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 0xde, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x95, 0xf9, 0xbc,
0xe2, 0xe8, 0x0d, 0x00, 0x00,
}
func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) {
@ -1949,6 +2102,76 @@ func (m *VerifyEmailRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error
return len(dAtA) - i, nil
}
func (m *IsNameValidRequest) 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 *IsNameValidRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *IsNameValidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = 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] = 0x12
}
if m.RequestedTier != 0 {
i = encodeVarintPaymentservice(dAtA, i, uint64(m.RequestedTier))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *IsNameValidResponse) 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 *IsNameValidResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *IsNameValidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0x12
}
if m.Code != 0 {
i = encodeVarintPaymentservice(dAtA, i, uint64(m.Code))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintPaymentservice(dAtA []byte, offset int, v uint64) int {
offset -= sovPaymentservice(v)
base := offset
@ -2271,6 +2494,38 @@ func (m *VerifyEmailRequestSigned) Size() (n int) {
return n
}
func (m *IsNameValidRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.RequestedTier != 0 {
n += 1 + sovPaymentservice(uint64(m.RequestedTier))
}
l = len(m.RequestedAnyName)
if l > 0 {
n += 1 + l + sovPaymentservice(uint64(l))
}
return n
}
func (m *IsNameValidResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Code != 0 {
n += 1 + sovPaymentservice(uint64(m.Code))
}
l = len(m.Description)
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
}
@ -4342,6 +4597,208 @@ func (m *VerifyEmailRequestSigned) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *IsNameValidRequest) 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: IsNameValidRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IsNameValidRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType)
}
m.RequestedTier = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPaymentservice
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.RequestedTier |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
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:])
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 *IsNameValidResponse) 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: IsNameValidResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IsNameValidResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
}
m.Code = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPaymentservice
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Code |= IsNameValidResponse_Code(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = 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

View file

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
// protoc-gen-go-drpc version: v0.0.33
// protoc-gen-go-drpc version: v0.0.34
// source: paymentservice/paymentserviceproto/protos/paymentservice.proto
package paymentserviceproto
@ -41,6 +41,7 @@ type DRPCAnyPaymentProcessingClient interface {
DRPCConn() drpc.Conn
GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error)
IsNameValid(ctx context.Context, in *IsNameValidRequest) (*IsNameValidResponse, error)
BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error)
FinalizeSubscription(ctx context.Context, in *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error)
GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error)
@ -68,6 +69,15 @@ func (c *drpcAnyPaymentProcessingClient) GetSubscriptionStatus(ctx context.Conte
return out, nil
}
func (c *drpcAnyPaymentProcessingClient) IsNameValid(ctx context.Context, in *IsNameValidRequest) (*IsNameValidResponse, error) {
out := new(IsNameValidResponse)
err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/IsNameValid", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *drpcAnyPaymentProcessingClient) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) {
out := new(BuySubscriptionResponse)
err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/BuySubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out)
@ -124,6 +134,7 @@ func (c *drpcAnyPaymentProcessingClient) GetAllTiers(ctx context.Context, in *Ge
type DRPCAnyPaymentProcessingServer interface {
GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error)
IsNameValid(context.Context, *IsNameValidRequest) (*IsNameValidResponse, error)
BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error)
FinalizeSubscription(context.Context, *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error)
GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error)
@ -138,6 +149,10 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionStatus(cont
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
}
func (s *DRPCAnyPaymentProcessingUnimplementedServer) IsNameValid(context.Context, *IsNameValidRequest) (*IsNameValidResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
}
func (s *DRPCAnyPaymentProcessingUnimplementedServer) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
}
@ -164,7 +179,7 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetAllTiers(context.Contex
type DRPCAnyPaymentProcessingDescription struct{}
func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 7 }
func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 8 }
func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
switch n {
@ -178,6 +193,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding,
)
}, DRPCAnyPaymentProcessingServer.GetSubscriptionStatus, true
case 1:
return "/AnyPaymentProcessing/IsNameValid", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCAnyPaymentProcessingServer).
IsNameValid(
ctx,
in1.(*IsNameValidRequest),
)
}, DRPCAnyPaymentProcessingServer.IsNameValid, true
case 2:
return "/AnyPaymentProcessing/BuySubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCAnyPaymentProcessingServer).
@ -186,7 +210,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding,
in1.(*BuySubscriptionRequestSigned),
)
}, DRPCAnyPaymentProcessingServer.BuySubscription, true
case 2:
case 3:
return "/AnyPaymentProcessing/FinalizeSubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCAnyPaymentProcessingServer).
@ -195,7 +219,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding,
in1.(*FinalizeSubscriptionRequestSigned),
)
}, DRPCAnyPaymentProcessingServer.FinalizeSubscription, true
case 3:
case 4:
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).
@ -204,7 +228,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding,
in1.(*GetSubscriptionPortalLinkRequestSigned),
)
}, DRPCAnyPaymentProcessingServer.GetSubscriptionPortalLink, true
case 4:
case 5:
return "/AnyPaymentProcessing/GetVerificationEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCAnyPaymentProcessingServer).
@ -213,7 +237,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding,
in1.(*GetVerificationEmailRequestSigned),
)
}, DRPCAnyPaymentProcessingServer.GetVerificationEmail, true
case 5:
case 6:
return "/AnyPaymentProcessing/VerifyEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCAnyPaymentProcessingServer).
@ -222,7 +246,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding,
in1.(*VerifyEmailRequestSigned),
)
}, DRPCAnyPaymentProcessingServer.VerifyEmail, true
case 6:
case 7:
return "/AnyPaymentProcessing/GetAllTiers", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCAnyPaymentProcessingServer).
@ -256,6 +280,22 @@ func (x *drpcAnyPaymentProcessing_GetSubscriptionStatusStream) SendAndClose(m *G
return x.CloseSend()
}
type DRPCAnyPaymentProcessing_IsNameValidStream interface {
drpc.Stream
SendAndClose(*IsNameValidResponse) error
}
type drpcAnyPaymentProcessing_IsNameValidStream struct {
drpc.Stream
}
func (x *drpcAnyPaymentProcessing_IsNameValidStream) SendAndClose(m *IsNameValidResponse) error {
if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil {
return err
}
return x.CloseSend()
}
type DRPCAnyPaymentProcessing_BuySubscriptionStream interface {
drpc.Stream
SendAndClose(*BuySubscriptionResponse) error

View file

@ -187,12 +187,37 @@ message VerifyEmailRequestSigned {
bytes signature = 2;
}
message IsNameValidRequest {
int32 requestedTier = 1;
string requestedAnyName = 2;
}
message IsNameValidResponse {
Code code = 1;
string description = 2;
enum Code {
Valid = 0;
NoDotAny = 1;
TooShort = 2;
TooLong = 3;
HasInvalidChars = 4;
TierFeatureNoName = 5;
// if everything is fine - "name is already taken" check should be done in the NS
// see IsNameAvailable()
}
}
// NOTICE:
// 1 - User can not ask for a payment/other links on behalf of another user (a signature is required)
// 2 - Admin can do that on behalf of any user
service AnyPaymentProcessing {
rpc GetSubscriptionStatus(GetSubscriptionRequestSigned) returns (GetSubscriptionResponse) {}
// Check if the requested name is valid for the requested tier
// before requesting a payment link and paying
rpc IsNameValid(IsNameValidRequest) returns (IsNameValidResponse) {}
// Save a new BillingID to DB, and return a payment link.
// You can call BuySubscription multiple times even if current payment is not processed yet
// (to get new payment link).