paymentserviceproto

package
v0.3.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPaymentservice        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPaymentservice          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPaymentservice = fmt.Errorf("proto: unexpected end of group")
)
View Source
var PaymentMethod_name = map[int32]string{
	0: "Method_Card",
	1: "Method_Crypto",
	2: "Method_ApplePay",
	3: "Method_GooglePay",
}
View Source
var PaymentMethod_value = map[string]int32{
	"Method_Card":      0,
	"Method_Crypto":    1,
	"Method_ApplePay":  2,
	"Method_GooglePay": 3,
}
View Source
var SubscriptionStatus_name = map[int32]string{
	0: "Status_Unknown",
	1: "Status_Pending",
	2: "Status_Active",
	3: "Status_Expired",
	4: "Status_Canceled",
}
View Source
var SubscriptionStatus_value = map[string]int32{
	"Status_Unknown":  0,
	"Status_Pending":  1,
	"Status_Active":   2,
	"Status_Expired":  3,
	"Status_Canceled": 4,
}
View Source
var SubscriptionTier_name = map[int32]string{
	0: "Tier_Unknown",
	1: "Tier_Friend",
	2: "Tier_Supporter1Year",
	3: "Tier_Patron1Year",
}
View Source
var SubscriptionTier_value = map[string]int32{
	"Tier_Unknown":        0,
	"Tier_Friend":         1,
	"Tier_Supporter1Year": 2,
	"Tier_Patron1Year":    3,
}

Functions

func DRPCRegisterAnyPaymentProcessing

func DRPCRegisterAnyPaymentProcessing(mux drpc.Mux, impl DRPCAnyPaymentProcessingServer) error

Types

type BuySubscriptionRequest

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!
	//
	// 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"`
}

2

func (*BuySubscriptionRequest) Descriptor

func (*BuySubscriptionRequest) Descriptor() ([]byte, []int)

func (*BuySubscriptionRequest) GetOwnerAnyID

func (m *BuySubscriptionRequest) GetOwnerAnyID() string

func (*BuySubscriptionRequest) GetOwnerEthAddress

func (m *BuySubscriptionRequest) GetOwnerEthAddress() string

func (*BuySubscriptionRequest) GetPaymentMethod

func (m *BuySubscriptionRequest) GetPaymentMethod() PaymentMethod

func (*BuySubscriptionRequest) GetRequestedTier

func (m *BuySubscriptionRequest) GetRequestedTier() SubscriptionTier

func (*BuySubscriptionRequest) Marshal

func (m *BuySubscriptionRequest) Marshal() (dAtA []byte, err error)

func (*BuySubscriptionRequest) MarshalTo

func (m *BuySubscriptionRequest) MarshalTo(dAtA []byte) (int, error)

func (*BuySubscriptionRequest) MarshalToSizedBuffer

func (m *BuySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BuySubscriptionRequest) ProtoMessage

func (*BuySubscriptionRequest) ProtoMessage()

func (*BuySubscriptionRequest) Reset

func (m *BuySubscriptionRequest) Reset()

func (*BuySubscriptionRequest) Size

func (m *BuySubscriptionRequest) Size() (n int)

func (*BuySubscriptionRequest) String

func (m *BuySubscriptionRequest) String() string

func (*BuySubscriptionRequest) Unmarshal

func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error

func (*BuySubscriptionRequest) XXX_DiscardUnknown

func (m *BuySubscriptionRequest) XXX_DiscardUnknown()

func (*BuySubscriptionRequest) XXX_Marshal

func (m *BuySubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BuySubscriptionRequest) XXX_Merge

func (m *BuySubscriptionRequest) XXX_Merge(src proto.Message)

func (*BuySubscriptionRequest) XXX_Size

func (m *BuySubscriptionRequest) XXX_Size() int

func (*BuySubscriptionRequest) XXX_Unmarshal

func (m *BuySubscriptionRequest) XXX_Unmarshal(b []byte) error

type BuySubscriptionRequestSigned

type BuySubscriptionRequestSigned struct {
	// BuySubscriptionRequest
	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 (*BuySubscriptionRequestSigned) Descriptor

func (*BuySubscriptionRequestSigned) Descriptor() ([]byte, []int)

func (*BuySubscriptionRequestSigned) GetPayload

func (m *BuySubscriptionRequestSigned) GetPayload() []byte

func (*BuySubscriptionRequestSigned) GetSignature

func (m *BuySubscriptionRequestSigned) GetSignature() []byte

func (*BuySubscriptionRequestSigned) Marshal

func (m *BuySubscriptionRequestSigned) Marshal() (dAtA []byte, err error)

func (*BuySubscriptionRequestSigned) MarshalTo

func (m *BuySubscriptionRequestSigned) MarshalTo(dAtA []byte) (int, error)

func (*BuySubscriptionRequestSigned) MarshalToSizedBuffer

func (m *BuySubscriptionRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BuySubscriptionRequestSigned) ProtoMessage

func (*BuySubscriptionRequestSigned) ProtoMessage()

func (*BuySubscriptionRequestSigned) Reset

func (m *BuySubscriptionRequestSigned) Reset()

func (*BuySubscriptionRequestSigned) Size

func (m *BuySubscriptionRequestSigned) Size() (n int)

func (*BuySubscriptionRequestSigned) String

func (*BuySubscriptionRequestSigned) Unmarshal

func (m *BuySubscriptionRequestSigned) Unmarshal(dAtA []byte) error

func (*BuySubscriptionRequestSigned) XXX_DiscardUnknown

func (m *BuySubscriptionRequestSigned) XXX_DiscardUnknown()

func (*BuySubscriptionRequestSigned) XXX_Marshal

func (m *BuySubscriptionRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BuySubscriptionRequestSigned) XXX_Merge

func (m *BuySubscriptionRequestSigned) XXX_Merge(src proto.Message)

func (*BuySubscriptionRequestSigned) XXX_Size

func (m *BuySubscriptionRequestSigned) XXX_Size() int

func (*BuySubscriptionRequestSigned) XXX_Unmarshal

func (m *BuySubscriptionRequestSigned) XXX_Unmarshal(b []byte) error

type BuySubscriptionResponse

type BuySubscriptionResponse struct {
	// will feature current billing ID
	// stripe.com/?client_reference_id=1234
	PaymentUrl string `protobuf:"bytes,1,opt,name=paymentUrl,proto3" json:"paymentUrl,omitempty"`
}

func (*BuySubscriptionResponse) Descriptor

func (*BuySubscriptionResponse) Descriptor() ([]byte, []int)

func (*BuySubscriptionResponse) GetPaymentUrl

func (m *BuySubscriptionResponse) GetPaymentUrl() string

func (*BuySubscriptionResponse) Marshal

func (m *BuySubscriptionResponse) Marshal() (dAtA []byte, err error)

func (*BuySubscriptionResponse) MarshalTo

func (m *BuySubscriptionResponse) MarshalTo(dAtA []byte) (int, error)

func (*BuySubscriptionResponse) MarshalToSizedBuffer

func (m *BuySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BuySubscriptionResponse) ProtoMessage

func (*BuySubscriptionResponse) ProtoMessage()

func (*BuySubscriptionResponse) Reset

func (m *BuySubscriptionResponse) Reset()

func (*BuySubscriptionResponse) Size

func (m *BuySubscriptionResponse) Size() (n int)

func (*BuySubscriptionResponse) String

func (m *BuySubscriptionResponse) String() string

func (*BuySubscriptionResponse) Unmarshal

func (m *BuySubscriptionResponse) Unmarshal(dAtA []byte) error

func (*BuySubscriptionResponse) XXX_DiscardUnknown

func (m *BuySubscriptionResponse) XXX_DiscardUnknown()

func (*BuySubscriptionResponse) XXX_Marshal

func (m *BuySubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BuySubscriptionResponse) XXX_Merge

func (m *BuySubscriptionResponse) XXX_Merge(src proto.Message)

func (*BuySubscriptionResponse) XXX_Size

func (m *BuySubscriptionResponse) XXX_Size() int

func (*BuySubscriptionResponse) XXX_Unmarshal

func (m *BuySubscriptionResponse) XXX_Unmarshal(b []byte) error

type DRPCAnyPaymentProcessingClient

type DRPCAnyPaymentProcessingClient interface {
	DRPCConn() drpc.Conn

	GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error)
	BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error)
}

func NewDRPCAnyPaymentProcessingClient

func NewDRPCAnyPaymentProcessingClient(cc drpc.Conn) DRPCAnyPaymentProcessingClient

type DRPCAnyPaymentProcessingDescription

type DRPCAnyPaymentProcessingDescription struct{}

func (DRPCAnyPaymentProcessingDescription) Method

func (DRPCAnyPaymentProcessingDescription) NumMethods

type DRPCAnyPaymentProcessingServer

type DRPCAnyPaymentProcessingServer interface {
	GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error)
	BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error)
}

type DRPCAnyPaymentProcessingUnimplementedServer

type DRPCAnyPaymentProcessingUnimplementedServer struct{}

func (*DRPCAnyPaymentProcessingUnimplementedServer) BuySubscription

func (*DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionStatus

type DRPCAnyPaymentProcessing_BuySubscriptionStream

type DRPCAnyPaymentProcessing_BuySubscriptionStream interface {
	drpc.Stream
	SendAndClose(*BuySubscriptionResponse) error
}

type DRPCAnyPaymentProcessing_GetSubscriptionStatusStream

type DRPCAnyPaymentProcessing_GetSubscriptionStatusStream interface {
	drpc.Stream
	SendAndClose(*GetSubscriptionResponse) error
}

type GetSubscriptionRequest

type GetSubscriptionRequest struct {
	// in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS"
	OwnerAnyID string `protobuf:"bytes,1,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"`
}

1

func (*GetSubscriptionRequest) Descriptor

func (*GetSubscriptionRequest) Descriptor() ([]byte, []int)

func (*GetSubscriptionRequest) GetOwnerAnyID

func (m *GetSubscriptionRequest) GetOwnerAnyID() string

func (*GetSubscriptionRequest) Marshal

func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error)

func (*GetSubscriptionRequest) MarshalTo

func (m *GetSubscriptionRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetSubscriptionRequest) MarshalToSizedBuffer

func (m *GetSubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetSubscriptionRequest) ProtoMessage

func (*GetSubscriptionRequest) ProtoMessage()

func (*GetSubscriptionRequest) Reset

func (m *GetSubscriptionRequest) Reset()

func (*GetSubscriptionRequest) Size

func (m *GetSubscriptionRequest) Size() (n int)

func (*GetSubscriptionRequest) String

func (m *GetSubscriptionRequest) String() string

func (*GetSubscriptionRequest) Unmarshal

func (m *GetSubscriptionRequest) Unmarshal(dAtA []byte) error

func (*GetSubscriptionRequest) XXX_DiscardUnknown

func (m *GetSubscriptionRequest) XXX_DiscardUnknown()

func (*GetSubscriptionRequest) XXX_Marshal

func (m *GetSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetSubscriptionRequest) XXX_Merge

func (m *GetSubscriptionRequest) XXX_Merge(src proto.Message)

func (*GetSubscriptionRequest) XXX_Size

func (m *GetSubscriptionRequest) XXX_Size() int

func (*GetSubscriptionRequest) XXX_Unmarshal

func (m *GetSubscriptionRequest) XXX_Unmarshal(b []byte) error

type GetSubscriptionRequestSigned

type GetSubscriptionRequestSigned struct {
	// GetSubscriptionRequest
	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 (*GetSubscriptionRequestSigned) Descriptor

func (*GetSubscriptionRequestSigned) Descriptor() ([]byte, []int)

func (*GetSubscriptionRequestSigned) GetPayload

func (m *GetSubscriptionRequestSigned) GetPayload() []byte

func (*GetSubscriptionRequestSigned) GetSignature

func (m *GetSubscriptionRequestSigned) GetSignature() []byte

func (*GetSubscriptionRequestSigned) Marshal

func (m *GetSubscriptionRequestSigned) Marshal() (dAtA []byte, err error)

func (*GetSubscriptionRequestSigned) MarshalTo

func (m *GetSubscriptionRequestSigned) MarshalTo(dAtA []byte) (int, error)

func (*GetSubscriptionRequestSigned) MarshalToSizedBuffer

func (m *GetSubscriptionRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetSubscriptionRequestSigned) ProtoMessage

func (*GetSubscriptionRequestSigned) ProtoMessage()

func (*GetSubscriptionRequestSigned) Reset

func (m *GetSubscriptionRequestSigned) Reset()

func (*GetSubscriptionRequestSigned) Size

func (m *GetSubscriptionRequestSigned) Size() (n int)

func (*GetSubscriptionRequestSigned) String

func (*GetSubscriptionRequestSigned) Unmarshal

func (m *GetSubscriptionRequestSigned) Unmarshal(dAtA []byte) error

func (*GetSubscriptionRequestSigned) XXX_DiscardUnknown

func (m *GetSubscriptionRequestSigned) XXX_DiscardUnknown()

func (*GetSubscriptionRequestSigned) XXX_Marshal

func (m *GetSubscriptionRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetSubscriptionRequestSigned) XXX_Merge

func (m *GetSubscriptionRequestSigned) XXX_Merge(src proto.Message)

func (*GetSubscriptionRequestSigned) XXX_Size

func (m *GetSubscriptionRequestSigned) XXX_Size() int

func (*GetSubscriptionRequestSigned) XXX_Unmarshal

func (m *GetSubscriptionRequestSigned) XXX_Unmarshal(b []byte) error

type GetSubscriptionResponse

type GetSubscriptionResponse struct {
	Tier   SubscriptionTier   `protobuf:"varint,1,opt,name=tier,proto3,enum=SubscriptionTier" json:"tier,omitempty"`
	Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"`
	// TODO: use google.protobuf.Timestamp and marshall it
	DateStarted uint64 `protobuf:"varint,3,opt,name=dateStarted,proto3" json:"dateStarted,omitempty"`
	DateEnds    uint64 `protobuf:"varint,4,opt,name=dateEnds,proto3" json:"dateEnds,omitempty"`
	IsAutoRenew bool   `protobuf:"varint,5,opt,name=isAutoRenew,proto3" json:"isAutoRenew,omitempty"`
	// if client has "downgraded" - he is still able to use the service until the end of the period
	// (dateEnds) but then he will be on nextTier until nextTierEnds
	//
	// if Tier0_Unknown -> then no next tier
	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"`
}

func (*GetSubscriptionResponse) Descriptor

func (*GetSubscriptionResponse) Descriptor() ([]byte, []int)

func (*GetSubscriptionResponse) GetDateEnds

func (m *GetSubscriptionResponse) GetDateEnds() uint64

func (*GetSubscriptionResponse) GetDateStarted

func (m *GetSubscriptionResponse) GetDateStarted() uint64

func (*GetSubscriptionResponse) GetIsAutoRenew

func (m *GetSubscriptionResponse) GetIsAutoRenew() bool

func (*GetSubscriptionResponse) GetNextTier

func (m *GetSubscriptionResponse) GetNextTier() SubscriptionTier

func (*GetSubscriptionResponse) GetNextTierEnds

func (m *GetSubscriptionResponse) GetNextTierEnds() uint64

func (*GetSubscriptionResponse) GetPaymentMethod

func (m *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod

func (*GetSubscriptionResponse) GetStatus

func (*GetSubscriptionResponse) GetTier

func (*GetSubscriptionResponse) Marshal

func (m *GetSubscriptionResponse) Marshal() (dAtA []byte, err error)

func (*GetSubscriptionResponse) MarshalTo

func (m *GetSubscriptionResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetSubscriptionResponse) MarshalToSizedBuffer

func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetSubscriptionResponse) ProtoMessage

func (*GetSubscriptionResponse) ProtoMessage()

func (*GetSubscriptionResponse) Reset

func (m *GetSubscriptionResponse) Reset()

func (*GetSubscriptionResponse) Size

func (m *GetSubscriptionResponse) Size() (n int)

func (*GetSubscriptionResponse) String

func (m *GetSubscriptionResponse) String() string

func (*GetSubscriptionResponse) Unmarshal

func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error

func (*GetSubscriptionResponse) XXX_DiscardUnknown

func (m *GetSubscriptionResponse) XXX_DiscardUnknown()

func (*GetSubscriptionResponse) XXX_Marshal

func (m *GetSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetSubscriptionResponse) XXX_Merge

func (m *GetSubscriptionResponse) XXX_Merge(src proto.Message)

func (*GetSubscriptionResponse) XXX_Size

func (m *GetSubscriptionResponse) XXX_Size() int

func (*GetSubscriptionResponse) XXX_Unmarshal

func (m *GetSubscriptionResponse) XXX_Unmarshal(b []byte) error

type PaymentMethod

type PaymentMethod int32
const (
	PaymentMethod_Method_Card      PaymentMethod = 0
	PaymentMethod_Method_Crypto    PaymentMethod = 1
	PaymentMethod_Method_ApplePay  PaymentMethod = 2
	PaymentMethod_Method_GooglePay PaymentMethod = 3
)

func (PaymentMethod) EnumDescriptor

func (PaymentMethod) EnumDescriptor() ([]byte, []int)

func (PaymentMethod) String

func (x PaymentMethod) String() string

type SubscriptionStatus

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
)

func (SubscriptionStatus) EnumDescriptor

func (SubscriptionStatus) EnumDescriptor() ([]byte, []int)

func (SubscriptionStatus) String

func (x SubscriptionStatus) String() string

type SubscriptionTier

type SubscriptionTier int32
const (
	SubscriptionTier_Tier_Unknown        SubscriptionTier = 0
	SubscriptionTier_Tier_Friend         SubscriptionTier = 1
	SubscriptionTier_Tier_Supporter1Year SubscriptionTier = 2
	SubscriptionTier_Tier_Patron1Year    SubscriptionTier = 3
)

func (SubscriptionTier) EnumDescriptor

func (SubscriptionTier) EnumDescriptor() ([]byte, []int)

func (SubscriptionTier) String

func (x SubscriptionTier) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL