Documentation ¶
Index ¶
- Variables
- func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
- type CreatePaymentRequest
- func (*CreatePaymentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePaymentRequest) GetAmount() float64
- func (x *CreatePaymentRequest) GetCustomerId() string
- func (x *CreatePaymentRequest) GetOrderId() string
- func (*CreatePaymentRequest) ProtoMessage()
- func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message
- func (x *CreatePaymentRequest) Reset()
- func (x *CreatePaymentRequest) String() string
- type CreatePaymentResponse
- func (*CreatePaymentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePaymentResponse) GetId() string
- func (x *CreatePaymentResponse) GetStatus() bool
- func (*CreatePaymentResponse) ProtoMessage()
- func (x *CreatePaymentResponse) ProtoReflect() protoreflect.Message
- func (x *CreatePaymentResponse) Reset()
- func (x *CreatePaymentResponse) String() string
- type GetPaymentRequest
- type GetPaymentResponse
- func (*GetPaymentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPaymentResponse) GetPayment() *Payment
- func (*GetPaymentResponse) ProtoMessage()
- func (x *GetPaymentResponse) ProtoReflect() protoreflect.Message
- func (x *GetPaymentResponse) Reset()
- func (x *GetPaymentResponse) String() string
- type ListPaymentsRequest
- func (*ListPaymentsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListPaymentsRequest) GetCount() int32
- func (x *ListPaymentsRequest) GetCustomerId() string
- func (x *ListPaymentsRequest) GetStart() int32
- func (*ListPaymentsRequest) ProtoMessage()
- func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message
- func (x *ListPaymentsRequest) Reset()
- func (x *ListPaymentsRequest) String() string
- type ListPaymentsResponse
- func (*ListPaymentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPaymentsResponse) GetPayments() []*Payment
- func (*ListPaymentsResponse) ProtoMessage()
- func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message
- func (x *ListPaymentsResponse) Reset()
- func (x *ListPaymentsResponse) String() string
- type Payment
- func (*Payment) Descriptor() ([]byte, []int)deprecated
- func (x *Payment) GetAmount() float64
- func (x *Payment) GetCustomerId() string
- func (x *Payment) GetId() string
- func (x *Payment) GetOrderId() string
- func (x *Payment) GetStatus() string
- func (*Payment) ProtoMessage()
- func (x *Payment) ProtoReflect() protoreflect.Message
- func (x *Payment) Reset()
- func (x *Payment) String() string
- type PaymentServiceClient
- type PaymentServiceServer
- type UnimplementedPaymentServiceServer
- func (UnimplementedPaymentServiceServer) CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error)
- func (UnimplementedPaymentServiceServer) GetPayment(context.Context, *GetPaymentRequest) (*GetPaymentResponse, error)
- func (UnimplementedPaymentServiceServer) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error)
- type UnsafePaymentServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_payment_proto protoreflect.FileDescriptor
var PaymentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "PaymentService", HandlerType: (*PaymentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreatePayment", Handler: _PaymentService_CreatePayment_Handler, }, { MethodName: "GetPayment", Handler: _PaymentService_GetPayment_Handler, }, { MethodName: "ListPayments", Handler: _PaymentService_ListPayments_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "payment.proto", }
PaymentService_ServiceDesc is the grpc.ServiceDesc for PaymentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPaymentServiceServer ¶
func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
Types ¶
type CreatePaymentRequest ¶
type CreatePaymentRequest struct { OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*CreatePaymentRequest) Descriptor
deprecated
func (*CreatePaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreatePaymentRequest.ProtoReflect.Descriptor instead.
func (*CreatePaymentRequest) GetAmount ¶
func (x *CreatePaymentRequest) GetAmount() float64
func (*CreatePaymentRequest) GetCustomerId ¶
func (x *CreatePaymentRequest) GetCustomerId() string
func (*CreatePaymentRequest) GetOrderId ¶
func (x *CreatePaymentRequest) GetOrderId() string
func (*CreatePaymentRequest) ProtoMessage ¶
func (*CreatePaymentRequest) ProtoMessage()
func (*CreatePaymentRequest) ProtoReflect ¶
func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message
func (*CreatePaymentRequest) Reset ¶
func (x *CreatePaymentRequest) Reset()
func (*CreatePaymentRequest) String ¶
func (x *CreatePaymentRequest) String() string
type CreatePaymentResponse ¶
type CreatePaymentResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*CreatePaymentResponse) Descriptor
deprecated
func (*CreatePaymentResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreatePaymentResponse.ProtoReflect.Descriptor instead.
func (*CreatePaymentResponse) GetId ¶
func (x *CreatePaymentResponse) GetId() string
func (*CreatePaymentResponse) GetStatus ¶
func (x *CreatePaymentResponse) GetStatus() bool
func (*CreatePaymentResponse) ProtoMessage ¶
func (*CreatePaymentResponse) ProtoMessage()
func (*CreatePaymentResponse) ProtoReflect ¶
func (x *CreatePaymentResponse) ProtoReflect() protoreflect.Message
func (*CreatePaymentResponse) Reset ¶
func (x *CreatePaymentResponse) Reset()
func (*CreatePaymentResponse) String ¶
func (x *CreatePaymentResponse) String() string
type GetPaymentRequest ¶
type GetPaymentRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetPaymentRequest) Descriptor
deprecated
func (*GetPaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPaymentRequest.ProtoReflect.Descriptor instead.
func (*GetPaymentRequest) GetId ¶
func (x *GetPaymentRequest) GetId() string
func (*GetPaymentRequest) ProtoMessage ¶
func (*GetPaymentRequest) ProtoMessage()
func (*GetPaymentRequest) ProtoReflect ¶
func (x *GetPaymentRequest) ProtoReflect() protoreflect.Message
func (*GetPaymentRequest) Reset ¶
func (x *GetPaymentRequest) Reset()
func (*GetPaymentRequest) String ¶
func (x *GetPaymentRequest) String() string
type GetPaymentResponse ¶
type GetPaymentResponse struct { Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` // contains filtered or unexported fields }
func (*GetPaymentResponse) Descriptor
deprecated
func (*GetPaymentResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPaymentResponse.ProtoReflect.Descriptor instead.
func (*GetPaymentResponse) GetPayment ¶
func (x *GetPaymentResponse) GetPayment() *Payment
func (*GetPaymentResponse) ProtoMessage ¶
func (*GetPaymentResponse) ProtoMessage()
func (*GetPaymentResponse) ProtoReflect ¶
func (x *GetPaymentResponse) ProtoReflect() protoreflect.Message
func (*GetPaymentResponse) Reset ¶
func (x *GetPaymentResponse) Reset()
func (*GetPaymentResponse) String ¶
func (x *GetPaymentResponse) String() string
type ListPaymentsRequest ¶
type ListPaymentsRequest struct { CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` Start int32 `protobuf:"varint,3,opt,name=start,proto3" json:"start,omitempty"` // contains filtered or unexported fields }
func (*ListPaymentsRequest) Descriptor
deprecated
func (*ListPaymentsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPaymentsRequest.ProtoReflect.Descriptor instead.
func (*ListPaymentsRequest) GetCount ¶
func (x *ListPaymentsRequest) GetCount() int32
func (*ListPaymentsRequest) GetCustomerId ¶
func (x *ListPaymentsRequest) GetCustomerId() string
func (*ListPaymentsRequest) GetStart ¶
func (x *ListPaymentsRequest) GetStart() int32
func (*ListPaymentsRequest) ProtoMessage ¶
func (*ListPaymentsRequest) ProtoMessage()
func (*ListPaymentsRequest) ProtoReflect ¶
func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message
func (*ListPaymentsRequest) Reset ¶
func (x *ListPaymentsRequest) Reset()
func (*ListPaymentsRequest) String ¶
func (x *ListPaymentsRequest) String() string
type ListPaymentsResponse ¶
type ListPaymentsResponse struct { Payments []*Payment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,omitempty"` // contains filtered or unexported fields }
func (*ListPaymentsResponse) Descriptor
deprecated
func (*ListPaymentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPaymentsResponse.ProtoReflect.Descriptor instead.
func (*ListPaymentsResponse) GetPayments ¶
func (x *ListPaymentsResponse) GetPayments() []*Payment
func (*ListPaymentsResponse) ProtoMessage ¶
func (*ListPaymentsResponse) ProtoMessage()
func (*ListPaymentsResponse) ProtoReflect ¶
func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message
func (*ListPaymentsResponse) Reset ¶
func (x *ListPaymentsResponse) Reset()
func (*ListPaymentsResponse) String ¶
func (x *ListPaymentsResponse) String() string
type Payment ¶
type Payment struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` CustomerId string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Amount float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Payment) Descriptor
deprecated
func (*Payment) GetCustomerId ¶
func (*Payment) GetOrderId ¶
func (*Payment) ProtoMessage ¶
func (*Payment) ProtoMessage()
func (*Payment) ProtoReflect ¶
func (x *Payment) ProtoReflect() protoreflect.Message
type PaymentServiceClient ¶
type PaymentServiceClient interface { CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*CreatePaymentResponse, error) GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...grpc.CallOption) (*GetPaymentResponse, error) ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error) }
PaymentServiceClient is the client API for PaymentService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPaymentServiceClient ¶
func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient
type PaymentServiceServer ¶
type PaymentServiceServer interface { CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error) GetPayment(context.Context, *GetPaymentRequest) (*GetPaymentResponse, error) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error) // contains filtered or unexported methods }
PaymentServiceServer is the server API for PaymentService service. All implementations must embed UnimplementedPaymentServiceServer for forward compatibility
type UnimplementedPaymentServiceServer ¶
type UnimplementedPaymentServiceServer struct { }
UnimplementedPaymentServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPaymentServiceServer) CreatePayment ¶
func (UnimplementedPaymentServiceServer) CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error)
func (UnimplementedPaymentServiceServer) GetPayment ¶
func (UnimplementedPaymentServiceServer) GetPayment(context.Context, *GetPaymentRequest) (*GetPaymentResponse, error)
func (UnimplementedPaymentServiceServer) ListPayments ¶
func (UnimplementedPaymentServiceServer) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error)
type UnsafePaymentServiceServer ¶
type UnsafePaymentServiceServer interface {
// contains filtered or unexported methods
}
UnsafePaymentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PaymentServiceServer will result in compilation errors.