Documentation ¶
Index ¶
- Variables
- func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
- type Blank
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetId() string
- func (x *CreateOrderRequest) GetPrice() float32
- func (x *CreateOrderRequest) GetTax() float32
- func (*CreateOrderRequest) ProtoMessage()
- func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CreateOrderRequest) Reset()
- func (x *CreateOrderRequest) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetFinalPrice() float32
- func (x *Order) GetId() string
- func (x *Order) GetPrice() float32
- func (x *Order) GetTax() float32
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderListResponse
- type OrderServiceClient
- type OrderServiceServer
- type UnimplementedOrderServiceServer
- type UnsafeOrderServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_internal_infra_grpc_protofiles_order_proto protoreflect.FileDescriptor
var OrderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.OrderService", HandlerType: (*OrderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateOrder", Handler: _OrderService_CreateOrder_Handler, }, { MethodName: "ListOrders", Handler: _OrderService_ListOrders_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal/infra/grpc/protofiles/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 Blank ¶
type Blank struct {
// contains filtered or unexported fields
}
func (*Blank) Descriptor
deprecated
func (*Blank) ProtoMessage ¶
func (*Blank) ProtoMessage()
func (*Blank) ProtoReflect ¶
func (x *Blank) ProtoReflect() protoreflect.Message
type CreateOrderRequest ¶
type CreateOrderRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Price float32 `protobuf:"fixed32,2,opt,name=price,proto3" json:"price,omitempty"` Tax float32 `protobuf:"fixed32,3,opt,name=tax,proto3" json:"tax,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetId ¶
func (x *CreateOrderRequest) GetId() string
func (*CreateOrderRequest) GetPrice ¶
func (x *CreateOrderRequest) GetPrice() float32
func (*CreateOrderRequest) GetTax ¶
func (x *CreateOrderRequest) GetTax() float32
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 Order ¶
type Order struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Price float32 `protobuf:"fixed32,2,opt,name=price,proto3" json:"price,omitempty"` Tax float32 `protobuf:"fixed32,3,opt,name=tax,proto3" json:"tax,omitempty"` FinalPrice float32 `protobuf:"fixed32,4,opt,name=final_price,json=finalPrice,proto3" json:"final_price,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetFinalPrice ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderListResponse ¶
type OrderListResponse struct { Orders []*Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*OrderListResponse) Descriptor
deprecated
func (*OrderListResponse) Descriptor() ([]byte, []int)
Deprecated: Use OrderListResponse.ProtoReflect.Descriptor instead.
func (*OrderListResponse) GetOrders ¶
func (x *OrderListResponse) GetOrders() []*Order
func (*OrderListResponse) ProtoMessage ¶
func (*OrderListResponse) ProtoMessage()
func (*OrderListResponse) ProtoReflect ¶
func (x *OrderListResponse) ProtoReflect() protoreflect.Message
func (*OrderListResponse) Reset ¶
func (x *OrderListResponse) Reset()
func (*OrderListResponse) String ¶
func (x *OrderListResponse) String() string
type OrderServiceClient ¶
type OrderServiceClient interface { CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error) ListOrders(ctx context.Context, in *Blank, opts ...grpc.CallOption) (*OrderListResponse, error) }
OrderServiceClient is the client API for OrderService 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 NewOrderServiceClient ¶
func NewOrderServiceClient(cc grpc.ClientConnInterface) OrderServiceClient
type OrderServiceServer ¶
type OrderServiceServer interface { CreateOrder(context.Context, *CreateOrderRequest) (*Order, error) ListOrders(context.Context, *Blank) (*OrderListResponse, 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 ¶
func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*Order, error)
func (UnimplementedOrderServiceServer) ListOrders ¶
func (UnimplementedOrderServiceServer) ListOrders(context.Context, *Blank) (*OrderListResponse, error)
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.