pb

package
v0.0.0-...-0a73d7f Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_order_pb_order_proto protoreflect.FileDescriptor
View Source
var OrderService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "order.OrderService",
	HandlerType: (*OrderServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateOrder",
			Handler:    _OrderService_CreateOrder_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/order/pb/order.proto",
}

OrderService_ServiceDesc is the grpc.ServiceDesc for OrderService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOrderServiceServer

func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)

Types

type CreateOrderRequest

type CreateOrderRequest struct {
	ProductId int64 `protobuf:"varint,1,opt,name=productId,proto3" json:"productId,omitempty"`
	Quantity  int64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	UserId    int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrderRequest) Descriptor deprecated

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

Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.

func (*CreateOrderRequest) GetProductId

func (x *CreateOrderRequest) GetProductId() int64

func (*CreateOrderRequest) GetQuantity

func (x *CreateOrderRequest) GetQuantity() int64

func (*CreateOrderRequest) GetUserId

func (x *CreateOrderRequest) GetUserId() int64

func (*CreateOrderRequest) ProtoMessage

func (*CreateOrderRequest) ProtoMessage()

func (*CreateOrderRequest) ProtoReflect

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

func (*CreateOrderRequest) Reset

func (x *CreateOrderRequest) Reset()

func (*CreateOrderRequest) String

func (x *CreateOrderRequest) String() string

type CreateOrderResponse

type CreateOrderResponse struct {
	Status int64  `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Error  string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	Id     int64  `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrderResponse) Descriptor deprecated

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

Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.

func (*CreateOrderResponse) GetError

func (x *CreateOrderResponse) GetError() string

func (*CreateOrderResponse) GetId

func (x *CreateOrderResponse) GetId() int64

func (*CreateOrderResponse) GetStatus

func (x *CreateOrderResponse) GetStatus() int64

func (*CreateOrderResponse) ProtoMessage

func (*CreateOrderResponse) ProtoMessage()

func (*CreateOrderResponse) ProtoReflect

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

func (*CreateOrderResponse) Reset

func (x *CreateOrderResponse) Reset()

func (*CreateOrderResponse) String

func (x *CreateOrderResponse) String() string

type OrderServiceClient

type OrderServiceClient interface {
	CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error)
}

OrderServiceClient is the client API for OrderService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type OrderServiceServer

type OrderServiceServer interface {
	CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
	// contains filtered or unexported methods
}

OrderServiceServer is the server API for OrderService service. All implementations must embed UnimplementedOrderServiceServer for forward compatibility

type UnimplementedOrderServiceServer

type UnimplementedOrderServiceServer struct {
}

UnimplementedOrderServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedOrderServiceServer) CreateOrder

type UnsafeOrderServiceServer

type UnsafeOrderServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeOrderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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