pb

package
v0.0.0-...-24e9612 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_protofile_payment_proto protoreflect.FileDescriptor
View Source
var PaymentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "payment.PaymentService",
	HandlerType: (*PaymentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Payment",
			Handler:    _PaymentService_Payment_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protofile/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 PaymentRequest

type PaymentRequest struct {
	CreditCard  *PaymentRequest_CreditCard `protobuf:"bytes,1,opt,name=creditCard,proto3" json:"creditCard,omitempty"`
	Amount      float64                    `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
	Store       string                     `protobuf:"bytes,3,opt,name=store,proto3" json:"store,omitempty"`
	Description string                     `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentRequest) Descriptor deprecated

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

Deprecated: Use PaymentRequest.ProtoReflect.Descriptor instead.

func (*PaymentRequest) GetAmount

func (x *PaymentRequest) GetAmount() float64

func (*PaymentRequest) GetCreditCard

func (x *PaymentRequest) GetCreditCard() *PaymentRequest_CreditCard

func (*PaymentRequest) GetDescription

func (x *PaymentRequest) GetDescription() string

func (*PaymentRequest) GetStore

func (x *PaymentRequest) GetStore() string

func (*PaymentRequest) ProtoMessage

func (*PaymentRequest) ProtoMessage()

func (*PaymentRequest) ProtoReflect

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

func (*PaymentRequest) Reset

func (x *PaymentRequest) Reset()

func (*PaymentRequest) String

func (x *PaymentRequest) String() string

type PaymentRequest_CreditCard

type PaymentRequest_CreditCard struct {
	Name            string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Number          string `protobuf:"bytes,2,opt,name=number,proto3" json:"number,omitempty"`
	ExpirationMonth int32  `protobuf:"varint,3,opt,name=expirationMonth,proto3" json:"expirationMonth,omitempty"`
	Expirationyear  int32  `protobuf:"varint,4,opt,name=expirationyear,proto3" json:"expirationyear,omitempty"`
	Cvv             int32  `protobuf:"varint,5,opt,name=cvv,proto3" json:"cvv,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentRequest_CreditCard) Descriptor deprecated

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

Deprecated: Use PaymentRequest_CreditCard.ProtoReflect.Descriptor instead.

func (*PaymentRequest_CreditCard) GetCvv

func (x *PaymentRequest_CreditCard) GetCvv() int32

func (*PaymentRequest_CreditCard) GetExpirationMonth

func (x *PaymentRequest_CreditCard) GetExpirationMonth() int32

func (*PaymentRequest_CreditCard) GetExpirationyear

func (x *PaymentRequest_CreditCard) GetExpirationyear() int32

func (*PaymentRequest_CreditCard) GetName

func (x *PaymentRequest_CreditCard) GetName() string

func (*PaymentRequest_CreditCard) GetNumber

func (x *PaymentRequest_CreditCard) GetNumber() string

func (*PaymentRequest_CreditCard) ProtoMessage

func (*PaymentRequest_CreditCard) ProtoMessage()

func (*PaymentRequest_CreditCard) ProtoReflect

func (*PaymentRequest_CreditCard) Reset

func (x *PaymentRequest_CreditCard) Reset()

func (*PaymentRequest_CreditCard) String

func (x *PaymentRequest_CreditCard) String() string

type PaymentServiceClient

type PaymentServiceClient interface {
	Payment(ctx context.Context, in *PaymentRequest, opts ...grpc.CallOption) (*empty.Empty, 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 {
	Payment(context.Context, *PaymentRequest) (*empty.Empty, 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) Payment

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