payments

package
v0.0.0-...-2068963 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_payment_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Payment.ProtoReflect.Descriptor instead.

func (*Payment) GetAmount

func (x *Payment) GetAmount() float64

func (*Payment) GetCustomerId

func (x *Payment) GetCustomerId() string

func (*Payment) GetId

func (x *Payment) GetId() string

func (*Payment) GetOrderId

func (x *Payment) GetOrderId() string

func (*Payment) GetStatus

func (x *Payment) GetStatus() string

func (*Payment) ProtoMessage

func (*Payment) ProtoMessage()

func (*Payment) ProtoReflect

func (x *Payment) ProtoReflect() protoreflect.Message

func (*Payment) Reset

func (x *Payment) Reset()

func (*Payment) String

func (x *Payment) String() string

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.

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) GetPayment

func (UnimplementedPaymentServiceServer) ListPayments

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.

Jump to

Keyboard shortcuts

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