Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
- type CatalogItem
- func (*CatalogItem) Descriptor() ([]byte, []int)deprecated
- func (x *CatalogItem) GetId() string
- func (x *CatalogItem) GetName() string
- func (x *CatalogItem) GetPrice() float64
- func (*CatalogItem) ProtoMessage()
- func (x *CatalogItem) ProtoReflect() protoreflect.Message
- func (x *CatalogItem) Reset()
- func (x *CatalogItem) String() string
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetCustomerId() string
- func (x *CreateOrderRequest) GetOrderLines() []*OrderLine
- func (*CreateOrderRequest) ProtoMessage()
- func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CreateOrderRequest) Reset()
- func (x *CreateOrderRequest) String() string
- type CreateOrderResponse
- type Customer
- func (*Customer) Descriptor() ([]byte, []int)deprecated
- func (x *Customer) GetCity() string
- func (x *Customer) GetCountry() string
- func (x *Customer) GetEmail() string
- func (x *Customer) GetId() string
- func (x *Customer) GetName() string
- func (x *Customer) GetStreet() string
- func (*Customer) ProtoMessage()
- func (x *Customer) ProtoReflect() protoreflect.Message
- func (x *Customer) Reset()
- func (x *Customer) String() string
- type DeleteOrderRequest
- func (*DeleteOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteOrderRequest) GetOrderId() string
- func (*DeleteOrderRequest) ProtoMessage()
- func (x *DeleteOrderRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteOrderRequest) Reset()
- func (x *DeleteOrderRequest) String() string
- type DeleteOrderResponse
- type GetOrderCreationResourcesRequest
- func (*GetOrderCreationResourcesRequest) Descriptor() ([]byte, []int)deprecated
- func (*GetOrderCreationResourcesRequest) ProtoMessage()
- func (x *GetOrderCreationResourcesRequest) ProtoReflect() protoreflect.Message
- func (x *GetOrderCreationResourcesRequest) Reset()
- func (x *GetOrderCreationResourcesRequest) String() string
- type GetOrderCreationResourcesResponse
- func (*GetOrderCreationResourcesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderCreationResourcesResponse) GetCustomers() []*Customer
- func (x *GetOrderCreationResourcesResponse) GetItems() []*CatalogItem
- func (*GetOrderCreationResourcesResponse) ProtoMessage()
- func (x *GetOrderCreationResourcesResponse) ProtoReflect() protoreflect.Message
- func (x *GetOrderCreationResourcesResponse) Reset()
- func (x *GetOrderCreationResourcesResponse) String() string
- type ListOrdersRequest
- type ListOrdersResponse
- func (*ListOrdersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrdersResponse) GetOrders() []*Order
- func (*ListOrdersResponse) ProtoMessage()
- func (x *ListOrdersResponse) ProtoReflect() protoreflect.Message
- func (x *ListOrdersResponse) Reset()
- func (x *ListOrdersResponse) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetCustomer() *Customer
- func (x *Order) GetId() string
- func (x *Order) GetOrderDate() *timestamppb.Timestamp
- func (x *Order) GetOrderLines() []*OrderLine
- func (x *Order) GetTotalPrice() float64
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderLine
- type OrderServiceClient
- type OrderServiceServer
- type UnimplementedOrderServiceServer
- func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
- func (UnimplementedOrderServiceServer) DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, error)
- func (UnimplementedOrderServiceServer) GetOrderCreationResources(context.Context, *GetOrderCreationResourcesRequest) (*GetOrderCreationResourcesResponse, error)
- func (UnimplementedOrderServiceServer) ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, error)
- type UnsafeOrderServiceServer
Constants ¶
const ( OrderService_ListOrders_FullMethodName = "/order.OrderService/ListOrders" OrderService_GetOrderCreationResources_FullMethodName = "/order.OrderService/GetOrderCreationResources" OrderService_CreateOrder_FullMethodName = "/order.OrderService/CreateOrder" OrderService_DeleteOrder_FullMethodName = "/order.OrderService/DeleteOrder" )
Variables ¶
var File_proto_order_proto protoreflect.FileDescriptor
var OrderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "order.OrderService", HandlerType: (*OrderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListOrders", Handler: _OrderService_ListOrders_Handler, }, { MethodName: "GetOrderCreationResources", Handler: _OrderService_GetOrderCreationResources_Handler, }, { MethodName: "CreateOrder", Handler: _OrderService_CreateOrder_Handler, }, { MethodName: "DeleteOrder", Handler: _OrderService_DeleteOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/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 CatalogItem ¶
type CatalogItem struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*CatalogItem) Descriptor
deprecated
func (*CatalogItem) Descriptor() ([]byte, []int)
Deprecated: Use CatalogItem.ProtoReflect.Descriptor instead.
func (*CatalogItem) GetId ¶
func (x *CatalogItem) GetId() string
func (*CatalogItem) GetName ¶
func (x *CatalogItem) GetName() string
func (*CatalogItem) GetPrice ¶
func (x *CatalogItem) GetPrice() float64
func (*CatalogItem) ProtoMessage ¶
func (*CatalogItem) ProtoMessage()
func (*CatalogItem) ProtoReflect ¶
func (x *CatalogItem) ProtoReflect() protoreflect.Message
func (*CatalogItem) Reset ¶
func (x *CatalogItem) Reset()
func (*CatalogItem) String ¶
func (x *CatalogItem) String() string
type CreateOrderRequest ¶
type CreateOrderRequest struct { CustomerId string `protobuf:"bytes,1,opt,name=customerId,proto3" json:"customerId,omitempty"` OrderLines []*OrderLine `protobuf:"bytes,2,rep,name=orderLines,proto3" json:"orderLines,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetCustomerId ¶
func (x *CreateOrderRequest) GetCustomerId() string
func (*CreateOrderRequest) GetOrderLines ¶
func (x *CreateOrderRequest) GetOrderLines() []*OrderLine
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 {
// contains filtered or unexported fields
}
func (*CreateOrderResponse) Descriptor
deprecated
func (*CreateOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.
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 Customer ¶
type Customer struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Street string `protobuf:"bytes,4,opt,name=street,proto3" json:"street,omitempty"` City string `protobuf:"bytes,5,opt,name=city,proto3" json:"city,omitempty"` Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"` // contains filtered or unexported fields }
func (*Customer) Descriptor
deprecated
func (*Customer) GetCountry ¶
func (*Customer) ProtoMessage ¶
func (*Customer) ProtoMessage()
func (*Customer) ProtoReflect ¶
func (x *Customer) ProtoReflect() protoreflect.Message
type DeleteOrderRequest ¶
type DeleteOrderRequest struct { OrderId string `protobuf:"bytes,1,opt,name=orderId,proto3" json:"orderId,omitempty"` // contains filtered or unexported fields }
func (*DeleteOrderRequest) Descriptor
deprecated
func (*DeleteOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOrderRequest.ProtoReflect.Descriptor instead.
func (*DeleteOrderRequest) GetOrderId ¶
func (x *DeleteOrderRequest) GetOrderId() string
func (*DeleteOrderRequest) ProtoMessage ¶
func (*DeleteOrderRequest) ProtoMessage()
func (*DeleteOrderRequest) ProtoReflect ¶
func (x *DeleteOrderRequest) ProtoReflect() protoreflect.Message
func (*DeleteOrderRequest) Reset ¶
func (x *DeleteOrderRequest) Reset()
func (*DeleteOrderRequest) String ¶
func (x *DeleteOrderRequest) String() string
type DeleteOrderResponse ¶
type DeleteOrderResponse struct {
// contains filtered or unexported fields
}
func (*DeleteOrderResponse) Descriptor
deprecated
func (*DeleteOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOrderResponse.ProtoReflect.Descriptor instead.
func (*DeleteOrderResponse) ProtoMessage ¶
func (*DeleteOrderResponse) ProtoMessage()
func (*DeleteOrderResponse) ProtoReflect ¶
func (x *DeleteOrderResponse) ProtoReflect() protoreflect.Message
func (*DeleteOrderResponse) Reset ¶
func (x *DeleteOrderResponse) Reset()
func (*DeleteOrderResponse) String ¶
func (x *DeleteOrderResponse) String() string
type GetOrderCreationResourcesRequest ¶
type GetOrderCreationResourcesRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderCreationResourcesRequest) Descriptor
deprecated
func (*GetOrderCreationResourcesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderCreationResourcesRequest.ProtoReflect.Descriptor instead.
func (*GetOrderCreationResourcesRequest) ProtoMessage ¶
func (*GetOrderCreationResourcesRequest) ProtoMessage()
func (*GetOrderCreationResourcesRequest) ProtoReflect ¶
func (x *GetOrderCreationResourcesRequest) ProtoReflect() protoreflect.Message
func (*GetOrderCreationResourcesRequest) Reset ¶
func (x *GetOrderCreationResourcesRequest) Reset()
func (*GetOrderCreationResourcesRequest) String ¶
func (x *GetOrderCreationResourcesRequest) String() string
type GetOrderCreationResourcesResponse ¶
type GetOrderCreationResourcesResponse struct { Customers []*Customer `protobuf:"bytes,1,rep,name=customers,proto3" json:"customers,omitempty"` Items []*CatalogItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*GetOrderCreationResourcesResponse) Descriptor
deprecated
func (*GetOrderCreationResourcesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderCreationResourcesResponse.ProtoReflect.Descriptor instead.
func (*GetOrderCreationResourcesResponse) GetCustomers ¶
func (x *GetOrderCreationResourcesResponse) GetCustomers() []*Customer
func (*GetOrderCreationResourcesResponse) GetItems ¶
func (x *GetOrderCreationResourcesResponse) GetItems() []*CatalogItem
func (*GetOrderCreationResourcesResponse) ProtoMessage ¶
func (*GetOrderCreationResourcesResponse) ProtoMessage()
func (*GetOrderCreationResourcesResponse) ProtoReflect ¶
func (x *GetOrderCreationResourcesResponse) ProtoReflect() protoreflect.Message
func (*GetOrderCreationResourcesResponse) Reset ¶
func (x *GetOrderCreationResourcesResponse) Reset()
func (*GetOrderCreationResourcesResponse) String ¶
func (x *GetOrderCreationResourcesResponse) String() string
type ListOrdersRequest ¶
type ListOrdersRequest struct {
// contains filtered or unexported fields
}
func (*ListOrdersRequest) Descriptor
deprecated
func (*ListOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListOrdersRequest.ProtoReflect.Descriptor instead.
func (*ListOrdersRequest) ProtoMessage ¶
func (*ListOrdersRequest) ProtoMessage()
func (*ListOrdersRequest) ProtoReflect ¶
func (x *ListOrdersRequest) ProtoReflect() protoreflect.Message
func (*ListOrdersRequest) Reset ¶
func (x *ListOrdersRequest) Reset()
func (*ListOrdersRequest) String ¶
func (x *ListOrdersRequest) String() string
type ListOrdersResponse ¶
type ListOrdersResponse struct { Orders []*Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*ListOrdersResponse) Descriptor
deprecated
func (*ListOrdersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListOrdersResponse.ProtoReflect.Descriptor instead.
func (*ListOrdersResponse) GetOrders ¶
func (x *ListOrdersResponse) GetOrders() []*Order
func (*ListOrdersResponse) ProtoMessage ¶
func (*ListOrdersResponse) ProtoMessage()
func (*ListOrdersResponse) ProtoReflect ¶
func (x *ListOrdersResponse) ProtoReflect() protoreflect.Message
func (*ListOrdersResponse) Reset ¶
func (x *ListOrdersResponse) Reset()
func (*ListOrdersResponse) String ¶
func (x *ListOrdersResponse) String() string
type Order ¶
type Order struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Customer *Customer `protobuf:"bytes,2,opt,name=customer,proto3" json:"customer,omitempty"` OrderDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=order_date,json=orderDate,proto3" json:"order_date,omitempty"` OrderLines []*OrderLine `protobuf:"bytes,4,rep,name=orderLines,proto3" json:"orderLines,omitempty"` TotalPrice float64 `protobuf:"fixed64,5,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetCustomer ¶
func (*Order) GetOrderDate ¶
func (x *Order) GetOrderDate() *timestamppb.Timestamp
func (*Order) GetOrderLines ¶
func (*Order) GetTotalPrice ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderLine ¶
type OrderLine struct { Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` Item *CatalogItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*OrderLine) Descriptor
deprecated
func (*OrderLine) GetItem ¶
func (x *OrderLine) GetItem() *CatalogItem
func (*OrderLine) ProtoMessage ¶
func (*OrderLine) ProtoMessage()
func (*OrderLine) ProtoReflect ¶
func (x *OrderLine) ProtoReflect() protoreflect.Message
type OrderServiceClient ¶
type OrderServiceClient interface { ListOrders(ctx context.Context, in *ListOrdersRequest, opts ...grpc.CallOption) (*ListOrdersResponse, error) GetOrderCreationResources(ctx context.Context, in *GetOrderCreationResourcesRequest, opts ...grpc.CallOption) (*GetOrderCreationResourcesResponse, error) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error) DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...grpc.CallOption) (*DeleteOrderResponse, 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 { ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, error) GetOrderCreationResources(context.Context, *GetOrderCreationResourcesRequest) (*GetOrderCreationResourcesResponse, error) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error) DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, 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) (*CreateOrderResponse, error)
func (UnimplementedOrderServiceServer) DeleteOrder ¶
func (UnimplementedOrderServiceServer) DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, error)
func (UnimplementedOrderServiceServer) GetOrderCreationResources ¶
func (UnimplementedOrderServiceServer) GetOrderCreationResources(context.Context, *GetOrderCreationResourcesRequest) (*GetOrderCreationResourcesResponse, error)
func (UnimplementedOrderServiceServer) ListOrders ¶
func (UnimplementedOrderServiceServer) ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, 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.