Documentation ¶
Overview ¶
Package order is a generated protocol buffer package.
It is generated from these files:
order/order.proto
It has these top-level messages:
Order CreateOrderRequest GetOrderRequest GetOrderDetailRequest GetOrderDetailResponse ListOrdersRequest ListOrdersResponse DeleteOrderRequest
Package order is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package order is a generated protocol buffer package.
It is generated from these files:
order/order.proto
It has these top-level messages:
Order CreateOrderRequest GetOrderRequest GetOrderDetailRequest GetOrderDetailResponse ListOrdersRequest ListOrdersResponse DeleteOrderRequest
Index ¶
- func RegisterOrderServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOrderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOrderServiceServer(s *grpc.Server, srv OrderServiceServer)
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)
- func (m *CreateOrderRequest) GetItems() []string
- func (m *CreateOrderRequest) GetUser() string
- func (*CreateOrderRequest) ProtoMessage()
- func (m *CreateOrderRequest) Reset()
- func (m *CreateOrderRequest) String() string
- func (this *CreateOrderRequest) Validate() error
- type DeleteOrderRequest
- type GetOrderDetailRequest
- type GetOrderDetailResponse
- func (*GetOrderDetailResponse) Descriptor() ([]byte, []int)
- func (m *GetOrderDetailResponse) GetId() string
- func (m *GetOrderDetailResponse) GetItems() []*item.Item
- func (m *GetOrderDetailResponse) GetUser() string
- func (*GetOrderDetailResponse) ProtoMessage()
- func (m *GetOrderDetailResponse) Reset()
- func (m *GetOrderDetailResponse) String() string
- func (this *GetOrderDetailResponse) Validate() error
- type GetOrderRequest
- type ListOrdersRequest
- type ListOrdersResponse
- type Order
- type OrderServiceClient
- type OrderServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterOrderServiceHandler ¶
func RegisterOrderServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOrderServiceHandler registers the http handlers for service OrderService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOrderServiceHandlerFromEndpoint ¶
func RegisterOrderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOrderServiceHandlerFromEndpoint is same as RegisterOrderServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOrderServiceServer ¶
func RegisterOrderServiceServer(s *grpc.Server, srv OrderServiceServer)
Types ¶
type CreateOrderRequest ¶
type CreateOrderRequest struct { User string `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"` Items []string `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"` }
func (*CreateOrderRequest) Descriptor ¶
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
func (*CreateOrderRequest) GetItems ¶
func (m *CreateOrderRequest) GetItems() []string
func (*CreateOrderRequest) GetUser ¶
func (m *CreateOrderRequest) GetUser() string
func (*CreateOrderRequest) ProtoMessage ¶
func (*CreateOrderRequest) ProtoMessage()
func (*CreateOrderRequest) Reset ¶
func (m *CreateOrderRequest) Reset()
func (*CreateOrderRequest) String ¶
func (m *CreateOrderRequest) String() string
func (*CreateOrderRequest) Validate ¶
func (this *CreateOrderRequest) Validate() error
type DeleteOrderRequest ¶
type DeleteOrderRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*DeleteOrderRequest) Descriptor ¶
func (*DeleteOrderRequest) Descriptor() ([]byte, []int)
func (*DeleteOrderRequest) GetId ¶
func (m *DeleteOrderRequest) GetId() string
func (*DeleteOrderRequest) ProtoMessage ¶
func (*DeleteOrderRequest) ProtoMessage()
func (*DeleteOrderRequest) Reset ¶
func (m *DeleteOrderRequest) Reset()
func (*DeleteOrderRequest) String ¶
func (m *DeleteOrderRequest) String() string
func (*DeleteOrderRequest) Validate ¶
func (this *DeleteOrderRequest) Validate() error
type GetOrderDetailRequest ¶
type GetOrderDetailRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*GetOrderDetailRequest) Descriptor ¶
func (*GetOrderDetailRequest) Descriptor() ([]byte, []int)
func (*GetOrderDetailRequest) GetId ¶
func (m *GetOrderDetailRequest) GetId() string
func (*GetOrderDetailRequest) ProtoMessage ¶
func (*GetOrderDetailRequest) ProtoMessage()
func (*GetOrderDetailRequest) Reset ¶
func (m *GetOrderDetailRequest) Reset()
func (*GetOrderDetailRequest) String ¶
func (m *GetOrderDetailRequest) String() string
func (*GetOrderDetailRequest) Validate ¶
func (this *GetOrderDetailRequest) Validate() error
type GetOrderDetailResponse ¶
type GetOrderDetailResponse struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` User string `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"` Items []*item.Item `protobuf:"bytes,3,rep,name=items" json:"items,omitempty"` }
func (*GetOrderDetailResponse) Descriptor ¶
func (*GetOrderDetailResponse) Descriptor() ([]byte, []int)
func (*GetOrderDetailResponse) GetId ¶
func (m *GetOrderDetailResponse) GetId() string
func (*GetOrderDetailResponse) GetItems ¶
func (m *GetOrderDetailResponse) GetItems() []*item.Item
func (*GetOrderDetailResponse) GetUser ¶
func (m *GetOrderDetailResponse) GetUser() string
func (*GetOrderDetailResponse) ProtoMessage ¶
func (*GetOrderDetailResponse) ProtoMessage()
func (*GetOrderDetailResponse) Reset ¶
func (m *GetOrderDetailResponse) Reset()
func (*GetOrderDetailResponse) String ¶
func (m *GetOrderDetailResponse) String() string
func (*GetOrderDetailResponse) Validate ¶
func (this *GetOrderDetailResponse) Validate() error
type GetOrderRequest ¶
type GetOrderRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*GetOrderRequest) Descriptor ¶
func (*GetOrderRequest) Descriptor() ([]byte, []int)
func (*GetOrderRequest) GetId ¶
func (m *GetOrderRequest) GetId() string
func (*GetOrderRequest) ProtoMessage ¶
func (*GetOrderRequest) ProtoMessage()
func (*GetOrderRequest) Reset ¶
func (m *GetOrderRequest) Reset()
func (*GetOrderRequest) String ¶
func (m *GetOrderRequest) String() string
func (*GetOrderRequest) Validate ¶
func (this *GetOrderRequest) Validate() error
type ListOrdersRequest ¶
type ListOrdersRequest struct { // user is optional User string `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"` }
func (*ListOrdersRequest) Descriptor ¶
func (*ListOrdersRequest) Descriptor() ([]byte, []int)
func (*ListOrdersRequest) GetUser ¶
func (m *ListOrdersRequest) GetUser() string
func (*ListOrdersRequest) ProtoMessage ¶
func (*ListOrdersRequest) ProtoMessage()
func (*ListOrdersRequest) Reset ¶
func (m *ListOrdersRequest) Reset()
func (*ListOrdersRequest) String ¶
func (m *ListOrdersRequest) String() string
func (*ListOrdersRequest) Validate ¶
func (this *ListOrdersRequest) Validate() error
type ListOrdersResponse ¶
type ListOrdersResponse struct {
Orders []*Order `protobuf:"bytes,1,rep,name=orders" json:"orders,omitempty"`
}
func (*ListOrdersResponse) Descriptor ¶
func (*ListOrdersResponse) Descriptor() ([]byte, []int)
func (*ListOrdersResponse) GetOrders ¶
func (m *ListOrdersResponse) GetOrders() []*Order
func (*ListOrdersResponse) ProtoMessage ¶
func (*ListOrdersResponse) ProtoMessage()
func (*ListOrdersResponse) Reset ¶
func (m *ListOrdersResponse) Reset()
func (*ListOrdersResponse) String ¶
func (m *ListOrdersResponse) String() string
func (*ListOrdersResponse) Validate ¶
func (this *ListOrdersResponse) Validate() error
type Order ¶
type Order struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` User string `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"` Items []string `protobuf:"bytes,3,rep,name=items" json:"items,omitempty"` }
func (*Order) Descriptor ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
type OrderServiceClient ¶
type OrderServiceClient interface { CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*Order, error) GetOrderDetail(ctx context.Context, in *GetOrderDetailRequest, opts ...grpc.CallOption) (*GetOrderDetailResponse, error) ListOrders(ctx context.Context, in *ListOrdersRequest, opts ...grpc.CallOption) (*ListOrdersResponse, error) DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...grpc.CallOption) (*Order, error) UpdateOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*Order, error) }
func NewOrderServiceClient ¶
func NewOrderServiceClient(cc *grpc.ClientConn) OrderServiceClient
type OrderServiceServer ¶
type OrderServiceServer interface { CreateOrder(context.Context, *CreateOrderRequest) (*Order, error) GetOrder(context.Context, *GetOrderRequest) (*Order, error) GetOrderDetail(context.Context, *GetOrderDetailRequest) (*GetOrderDetailResponse, error) ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, error) DeleteOrder(context.Context, *DeleteOrderRequest) (*Order, error) UpdateOrder(context.Context, *Order) (*Order, error) }
Click to show internal directories.
Click to hide internal directories.