Documentation ¶
Index ¶
- Variables
- type ChargeReq
- func (*ChargeReq) Descriptor() ([]byte, []int)deprecated
- func (x *ChargeReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *ChargeReq) FastWrite(buf []byte) (offset int)
- func (x *ChargeReq) GetAmount() float32
- func (x *ChargeReq) GetCreditCard() *CreditCardInfo
- func (x *ChargeReq) GetOrderId() string
- func (x *ChargeReq) GetUserId() uint32
- func (*ChargeReq) ProtoMessage()
- func (x *ChargeReq) ProtoReflect() protoreflect.Message
- func (x *ChargeReq) Reset()
- func (x *ChargeReq) Size() (n int)
- func (x *ChargeReq) String() string
- type ChargeResp
- func (*ChargeResp) Descriptor() ([]byte, []int)deprecated
- func (x *ChargeResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *ChargeResp) FastWrite(buf []byte) (offset int)
- func (x *ChargeResp) GetTransactionId() string
- func (*ChargeResp) ProtoMessage()
- func (x *ChargeResp) ProtoReflect() protoreflect.Message
- func (x *ChargeResp) Reset()
- func (x *ChargeResp) Size() (n int)
- func (x *ChargeResp) String() string
- type CreditCardInfo
- func (*CreditCardInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CreditCardInfo) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *CreditCardInfo) FastWrite(buf []byte) (offset int)
- func (x *CreditCardInfo) GetCreditCardCvv() int32
- func (x *CreditCardInfo) GetCreditCardExpirationMonth() int32
- func (x *CreditCardInfo) GetCreditCardExpirationYear() int32
- func (x *CreditCardInfo) GetCreditCardNumber() string
- func (*CreditCardInfo) ProtoMessage()
- func (x *CreditCardInfo) ProtoReflect() protoreflect.Message
- func (x *CreditCardInfo) Reset()
- func (x *CreditCardInfo) Size() (n int)
- func (x *CreditCardInfo) String() string
- type PaymentService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_payment_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ChargeReq ¶
type ChargeReq struct { Amount float32 `protobuf:"fixed32,1,opt,name=amount,proto3" json:"amount,omitempty"` CreditCard *CreditCardInfo `protobuf:"bytes,2,opt,name=credit_card,json=creditCard,proto3" json:"credit_card,omitempty"` OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` UserId uint32 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*ChargeReq) Descriptor
deprecated
func (*ChargeReq) GetCreditCard ¶
func (x *ChargeReq) GetCreditCard() *CreditCardInfo
func (*ChargeReq) GetOrderId ¶
func (*ChargeReq) ProtoMessage ¶
func (*ChargeReq) ProtoMessage()
func (*ChargeReq) ProtoReflect ¶
func (x *ChargeReq) ProtoReflect() protoreflect.Message
type ChargeResp ¶
type ChargeResp struct { TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // contains filtered or unexported fields }
func (*ChargeResp) Descriptor
deprecated
func (*ChargeResp) Descriptor() ([]byte, []int)
Deprecated: Use ChargeResp.ProtoReflect.Descriptor instead.
func (*ChargeResp) FastWrite ¶
func (x *ChargeResp) FastWrite(buf []byte) (offset int)
func (*ChargeResp) GetTransactionId ¶
func (x *ChargeResp) GetTransactionId() string
func (*ChargeResp) ProtoMessage ¶
func (*ChargeResp) ProtoMessage()
func (*ChargeResp) ProtoReflect ¶
func (x *ChargeResp) ProtoReflect() protoreflect.Message
func (*ChargeResp) Reset ¶
func (x *ChargeResp) Reset()
func (*ChargeResp) Size ¶
func (x *ChargeResp) Size() (n int)
func (*ChargeResp) String ¶
func (x *ChargeResp) String() string
type CreditCardInfo ¶
type CreditCardInfo struct { CreditCardNumber string `protobuf:"bytes,1,opt,name=credit_card_number,json=creditCardNumber,proto3" json:"credit_card_number,omitempty"` CreditCardCvv int32 `protobuf:"varint,2,opt,name=credit_card_cvv,json=creditCardCvv,proto3" json:"credit_card_cvv,omitempty"` CreditCardExpirationYear int32 `` /* 138-byte string literal not displayed */ CreditCardExpirationMonth int32 `` /* 141-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CreditCardInfo) Descriptor
deprecated
func (*CreditCardInfo) Descriptor() ([]byte, []int)
Deprecated: Use CreditCardInfo.ProtoReflect.Descriptor instead.
func (*CreditCardInfo) FastWrite ¶
func (x *CreditCardInfo) FastWrite(buf []byte) (offset int)
func (*CreditCardInfo) GetCreditCardCvv ¶
func (x *CreditCardInfo) GetCreditCardCvv() int32
func (*CreditCardInfo) GetCreditCardExpirationMonth ¶
func (x *CreditCardInfo) GetCreditCardExpirationMonth() int32
func (*CreditCardInfo) GetCreditCardExpirationYear ¶
func (x *CreditCardInfo) GetCreditCardExpirationYear() int32
func (*CreditCardInfo) GetCreditCardNumber ¶
func (x *CreditCardInfo) GetCreditCardNumber() string
func (*CreditCardInfo) ProtoMessage ¶
func (*CreditCardInfo) ProtoMessage()
func (*CreditCardInfo) ProtoReflect ¶
func (x *CreditCardInfo) ProtoReflect() protoreflect.Message
func (*CreditCardInfo) Reset ¶
func (x *CreditCardInfo) Reset()
func (*CreditCardInfo) Size ¶
func (x *CreditCardInfo) Size() (n int)
func (*CreditCardInfo) String ¶
func (x *CreditCardInfo) String() string
type PaymentService ¶
type PaymentService interface {
Charge(ctx context.Context, req *ChargeReq) (res *ChargeResp, err error)
}
Click to show internal directories.
Click to hide internal directories.