Documentation ¶
Overview ¶
Package depotpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterDepotServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDepotServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DepotServiceClient) error
- func RegisterDepotServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDepotServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DepotServiceServer) error
- func RegisterDepotServiceServer(s grpc.ServiceRegistrar, srv DepotServiceServer)
- type AssignShoppingListRequest
- func (*AssignShoppingListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AssignShoppingListRequest) GetBotId() string
- func (x *AssignShoppingListRequest) GetId() string
- func (*AssignShoppingListRequest) ProtoMessage()
- func (x *AssignShoppingListRequest) ProtoReflect() protoreflect.Message
- func (x *AssignShoppingListRequest) Reset()
- func (x *AssignShoppingListRequest) String() string
- type AssignShoppingListResponse
- type CancelShoppingListRequest
- func (*CancelShoppingListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelShoppingListRequest) GetId() string
- func (*CancelShoppingListRequest) ProtoMessage()
- func (x *CancelShoppingListRequest) ProtoReflect() protoreflect.Message
- func (x *CancelShoppingListRequest) Reset()
- func (x *CancelShoppingListRequest) String() string
- type CancelShoppingListResponse
- type CompleteShoppingListRequest
- func (*CompleteShoppingListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CompleteShoppingListRequest) GetId() string
- func (*CompleteShoppingListRequest) ProtoMessage()
- func (x *CompleteShoppingListRequest) ProtoReflect() protoreflect.Message
- func (x *CompleteShoppingListRequest) Reset()
- func (x *CompleteShoppingListRequest) String() string
- type CompleteShoppingListResponse
- func (*CompleteShoppingListResponse) Descriptor() ([]byte, []int)deprecated
- func (*CompleteShoppingListResponse) ProtoMessage()
- func (x *CompleteShoppingListResponse) ProtoReflect() protoreflect.Message
- func (x *CompleteShoppingListResponse) Reset()
- func (x *CompleteShoppingListResponse) String() string
- type CreateShoppingListRequest
- func (*CreateShoppingListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShoppingListRequest) GetItems() []*OrderItem
- func (x *CreateShoppingListRequest) GetOrderId() string
- func (*CreateShoppingListRequest) ProtoMessage()
- func (x *CreateShoppingListRequest) ProtoReflect() protoreflect.Message
- func (x *CreateShoppingListRequest) Reset()
- func (x *CreateShoppingListRequest) String() string
- type CreateShoppingListResponse
- func (*CreateShoppingListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShoppingListResponse) GetId() string
- func (*CreateShoppingListResponse) ProtoMessage()
- func (x *CreateShoppingListResponse) ProtoReflect() protoreflect.Message
- func (x *CreateShoppingListResponse) Reset()
- func (x *CreateShoppingListResponse) String() string
- type DepotServiceClient
- type DepotServiceServer
- type Item
- type OrderItem
- func (*OrderItem) Descriptor() ([]byte, []int)deprecated
- func (x *OrderItem) GetProductId() string
- func (x *OrderItem) GetQuantity() int32
- func (x *OrderItem) GetStoreId() string
- func (*OrderItem) ProtoMessage()
- func (x *OrderItem) ProtoReflect() protoreflect.Message
- func (x *OrderItem) Reset()
- func (x *OrderItem) String() string
- type ShoppingList
- func (*ShoppingList) Descriptor() ([]byte, []int)deprecated
- func (x *ShoppingList) GetAssignedBotId() string
- func (x *ShoppingList) GetId() string
- func (x *ShoppingList) GetOrderId() string
- func (x *ShoppingList) GetStatus() string
- func (x *ShoppingList) GetStops() map[string]*Stop
- func (*ShoppingList) ProtoMessage()
- func (x *ShoppingList) ProtoReflect() protoreflect.Message
- func (x *ShoppingList) Reset()
- func (x *ShoppingList) String() string
- type Stop
- func (*Stop) Descriptor() ([]byte, []int)deprecated
- func (x *Stop) GetItems() map[string]*Item
- func (x *Stop) GetStoreLocation() string
- func (x *Stop) GetStoreName() string
- func (*Stop) ProtoMessage()
- func (x *Stop) ProtoReflect() protoreflect.Message
- func (x *Stop) Reset()
- func (x *Stop) String() string
- type UnimplementedDepotServiceServer
- func (UnimplementedDepotServiceServer) AssignShoppingList(context.Context, *AssignShoppingListRequest) (*AssignShoppingListResponse, error)
- func (UnimplementedDepotServiceServer) CancelShoppingList(context.Context, *CancelShoppingListRequest) (*CancelShoppingListResponse, error)
- func (UnimplementedDepotServiceServer) CompleteShoppingList(context.Context, *CompleteShoppingListRequest) (*CompleteShoppingListResponse, error)
- func (UnimplementedDepotServiceServer) CreateShoppingList(context.Context, *CreateShoppingListRequest) (*CreateShoppingListResponse, error)
- type UnsafeDepotServiceServer
Constants ¶
const ( DepotService_CreateShoppingList_FullMethodName = "/depotpb.DepotService/CreateShoppingList" DepotService_CancelShoppingList_FullMethodName = "/depotpb.DepotService/CancelShoppingList" DepotService_AssignShoppingList_FullMethodName = "/depotpb.DepotService/AssignShoppingList" DepotService_CompleteShoppingList_FullMethodName = "/depotpb.DepotService/CompleteShoppingList" )
Variables ¶
var DepotService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "depotpb.DepotService", HandlerType: (*DepotServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateShoppingList", Handler: _DepotService_CreateShoppingList_Handler, }, { MethodName: "CancelShoppingList", Handler: _DepotService_CancelShoppingList_Handler, }, { MethodName: "AssignShoppingList", Handler: _DepotService_AssignShoppingList_Handler, }, { MethodName: "CompleteShoppingList", Handler: _DepotService_CompleteShoppingList_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "depotpb/api.proto", }
DepotService_ServiceDesc is the grpc.ServiceDesc for DepotService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_depotpb_api_proto protoreflect.FileDescriptor
var File_depotpb_messages_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDepotServiceHandler ¶
func RegisterDepotServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDepotServiceHandler registers the http handlers for service DepotService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDepotServiceHandlerClient ¶
func RegisterDepotServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DepotServiceClient) error
RegisterDepotServiceHandlerClient registers the http handlers for service DepotService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DepotServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DepotServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DepotServiceClient" to call the correct interceptors.
func RegisterDepotServiceHandlerFromEndpoint ¶
func RegisterDepotServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDepotServiceHandlerFromEndpoint is same as RegisterDepotServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDepotServiceHandlerServer ¶
func RegisterDepotServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DepotServiceServer) error
RegisterDepotServiceHandlerServer registers the http handlers for service DepotService to "mux". UnaryRPC :call DepotServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDepotServiceHandlerFromEndpoint instead.
func RegisterDepotServiceServer ¶
func RegisterDepotServiceServer(s grpc.ServiceRegistrar, srv DepotServiceServer)
Types ¶
type AssignShoppingListRequest ¶
type AssignShoppingListRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` BotId string `protobuf:"bytes,2,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"` // contains filtered or unexported fields }
func (*AssignShoppingListRequest) Descriptor
deprecated
func (*AssignShoppingListRequest) Descriptor() ([]byte, []int)
Deprecated: Use AssignShoppingListRequest.ProtoReflect.Descriptor instead.
func (*AssignShoppingListRequest) GetBotId ¶
func (x *AssignShoppingListRequest) GetBotId() string
func (*AssignShoppingListRequest) GetId ¶
func (x *AssignShoppingListRequest) GetId() string
func (*AssignShoppingListRequest) ProtoMessage ¶
func (*AssignShoppingListRequest) ProtoMessage()
func (*AssignShoppingListRequest) ProtoReflect ¶
func (x *AssignShoppingListRequest) ProtoReflect() protoreflect.Message
func (*AssignShoppingListRequest) Reset ¶
func (x *AssignShoppingListRequest) Reset()
func (*AssignShoppingListRequest) String ¶
func (x *AssignShoppingListRequest) String() string
type AssignShoppingListResponse ¶
type AssignShoppingListResponse struct {
// contains filtered or unexported fields
}
func (*AssignShoppingListResponse) Descriptor
deprecated
func (*AssignShoppingListResponse) Descriptor() ([]byte, []int)
Deprecated: Use AssignShoppingListResponse.ProtoReflect.Descriptor instead.
func (*AssignShoppingListResponse) ProtoMessage ¶
func (*AssignShoppingListResponse) ProtoMessage()
func (*AssignShoppingListResponse) ProtoReflect ¶
func (x *AssignShoppingListResponse) ProtoReflect() protoreflect.Message
func (*AssignShoppingListResponse) Reset ¶
func (x *AssignShoppingListResponse) Reset()
func (*AssignShoppingListResponse) String ¶
func (x *AssignShoppingListResponse) String() string
type CancelShoppingListRequest ¶
type CancelShoppingListRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CancelShoppingListRequest) Descriptor
deprecated
func (*CancelShoppingListRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelShoppingListRequest.ProtoReflect.Descriptor instead.
func (*CancelShoppingListRequest) GetId ¶
func (x *CancelShoppingListRequest) GetId() string
func (*CancelShoppingListRequest) ProtoMessage ¶
func (*CancelShoppingListRequest) ProtoMessage()
func (*CancelShoppingListRequest) ProtoReflect ¶
func (x *CancelShoppingListRequest) ProtoReflect() protoreflect.Message
func (*CancelShoppingListRequest) Reset ¶
func (x *CancelShoppingListRequest) Reset()
func (*CancelShoppingListRequest) String ¶
func (x *CancelShoppingListRequest) String() string
type CancelShoppingListResponse ¶
type CancelShoppingListResponse struct {
// contains filtered or unexported fields
}
func (*CancelShoppingListResponse) Descriptor
deprecated
func (*CancelShoppingListResponse) Descriptor() ([]byte, []int)
Deprecated: Use CancelShoppingListResponse.ProtoReflect.Descriptor instead.
func (*CancelShoppingListResponse) ProtoMessage ¶
func (*CancelShoppingListResponse) ProtoMessage()
func (*CancelShoppingListResponse) ProtoReflect ¶
func (x *CancelShoppingListResponse) ProtoReflect() protoreflect.Message
func (*CancelShoppingListResponse) Reset ¶
func (x *CancelShoppingListResponse) Reset()
func (*CancelShoppingListResponse) String ¶
func (x *CancelShoppingListResponse) String() string
type CompleteShoppingListRequest ¶
type CompleteShoppingListRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CompleteShoppingListRequest) Descriptor
deprecated
func (*CompleteShoppingListRequest) Descriptor() ([]byte, []int)
Deprecated: Use CompleteShoppingListRequest.ProtoReflect.Descriptor instead.
func (*CompleteShoppingListRequest) GetId ¶
func (x *CompleteShoppingListRequest) GetId() string
func (*CompleteShoppingListRequest) ProtoMessage ¶
func (*CompleteShoppingListRequest) ProtoMessage()
func (*CompleteShoppingListRequest) ProtoReflect ¶
func (x *CompleteShoppingListRequest) ProtoReflect() protoreflect.Message
func (*CompleteShoppingListRequest) Reset ¶
func (x *CompleteShoppingListRequest) Reset()
func (*CompleteShoppingListRequest) String ¶
func (x *CompleteShoppingListRequest) String() string
type CompleteShoppingListResponse ¶
type CompleteShoppingListResponse struct {
// contains filtered or unexported fields
}
func (*CompleteShoppingListResponse) Descriptor
deprecated
func (*CompleteShoppingListResponse) Descriptor() ([]byte, []int)
Deprecated: Use CompleteShoppingListResponse.ProtoReflect.Descriptor instead.
func (*CompleteShoppingListResponse) ProtoMessage ¶
func (*CompleteShoppingListResponse) ProtoMessage()
func (*CompleteShoppingListResponse) ProtoReflect ¶
func (x *CompleteShoppingListResponse) ProtoReflect() protoreflect.Message
func (*CompleteShoppingListResponse) Reset ¶
func (x *CompleteShoppingListResponse) Reset()
func (*CompleteShoppingListResponse) String ¶
func (x *CompleteShoppingListResponse) String() string
type CreateShoppingListRequest ¶
type CreateShoppingListRequest struct { OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` Items []*OrderItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*CreateShoppingListRequest) Descriptor
deprecated
func (*CreateShoppingListRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateShoppingListRequest.ProtoReflect.Descriptor instead.
func (*CreateShoppingListRequest) GetItems ¶
func (x *CreateShoppingListRequest) GetItems() []*OrderItem
func (*CreateShoppingListRequest) GetOrderId ¶
func (x *CreateShoppingListRequest) GetOrderId() string
func (*CreateShoppingListRequest) ProtoMessage ¶
func (*CreateShoppingListRequest) ProtoMessage()
func (*CreateShoppingListRequest) ProtoReflect ¶
func (x *CreateShoppingListRequest) ProtoReflect() protoreflect.Message
func (*CreateShoppingListRequest) Reset ¶
func (x *CreateShoppingListRequest) Reset()
func (*CreateShoppingListRequest) String ¶
func (x *CreateShoppingListRequest) String() string
type CreateShoppingListResponse ¶
type CreateShoppingListResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateShoppingListResponse) Descriptor
deprecated
func (*CreateShoppingListResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateShoppingListResponse.ProtoReflect.Descriptor instead.
func (*CreateShoppingListResponse) GetId ¶
func (x *CreateShoppingListResponse) GetId() string
func (*CreateShoppingListResponse) ProtoMessage ¶
func (*CreateShoppingListResponse) ProtoMessage()
func (*CreateShoppingListResponse) ProtoReflect ¶
func (x *CreateShoppingListResponse) ProtoReflect() protoreflect.Message
func (*CreateShoppingListResponse) Reset ¶
func (x *CreateShoppingListResponse) Reset()
func (*CreateShoppingListResponse) String ¶
func (x *CreateShoppingListResponse) String() string
type DepotServiceClient ¶
type DepotServiceClient interface { CreateShoppingList(ctx context.Context, in *CreateShoppingListRequest, opts ...grpc.CallOption) (*CreateShoppingListResponse, error) CancelShoppingList(ctx context.Context, in *CancelShoppingListRequest, opts ...grpc.CallOption) (*CancelShoppingListResponse, error) AssignShoppingList(ctx context.Context, in *AssignShoppingListRequest, opts ...grpc.CallOption) (*AssignShoppingListResponse, error) CompleteShoppingList(ctx context.Context, in *CompleteShoppingListRequest, opts ...grpc.CallOption) (*CompleteShoppingListResponse, error) }
DepotServiceClient is the client API for DepotService 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 NewDepotServiceClient ¶
func NewDepotServiceClient(cc grpc.ClientConnInterface) DepotServiceClient
type DepotServiceServer ¶
type DepotServiceServer interface { CreateShoppingList(context.Context, *CreateShoppingListRequest) (*CreateShoppingListResponse, error) CancelShoppingList(context.Context, *CancelShoppingListRequest) (*CancelShoppingListResponse, error) AssignShoppingList(context.Context, *AssignShoppingListRequest) (*AssignShoppingListResponse, error) CompleteShoppingList(context.Context, *CompleteShoppingListRequest) (*CompleteShoppingListResponse, error) // contains filtered or unexported methods }
DepotServiceServer is the server API for DepotService service. All implementations must embed UnimplementedDepotServiceServer for forward compatibility
type Item ¶
type Item struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetQuantity ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type OrderItem ¶
type OrderItem struct { ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` StoreId string `protobuf:"bytes,2,opt,name=store_id,json=storeId,proto3" json:"store_id,omitempty"` Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*OrderItem) Descriptor
deprecated
func (*OrderItem) GetProductId ¶
func (*OrderItem) GetQuantity ¶
func (*OrderItem) GetStoreId ¶
func (*OrderItem) ProtoMessage ¶
func (*OrderItem) ProtoMessage()
func (*OrderItem) ProtoReflect ¶
func (x *OrderItem) ProtoReflect() protoreflect.Message
type ShoppingList ¶
type ShoppingList struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` Stops map[string]*Stop `` /* 151-byte string literal not displayed */ AssignedBotId string `protobuf:"bytes,4,opt,name=assigned_bot_id,json=assignedBotId,proto3" json:"assigned_bot_id,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ShoppingList) Descriptor
deprecated
func (*ShoppingList) Descriptor() ([]byte, []int)
Deprecated: Use ShoppingList.ProtoReflect.Descriptor instead.
func (*ShoppingList) GetAssignedBotId ¶
func (x *ShoppingList) GetAssignedBotId() string
func (*ShoppingList) GetId ¶
func (x *ShoppingList) GetId() string
func (*ShoppingList) GetOrderId ¶
func (x *ShoppingList) GetOrderId() string
func (*ShoppingList) GetStatus ¶
func (x *ShoppingList) GetStatus() string
func (*ShoppingList) GetStops ¶
func (x *ShoppingList) GetStops() map[string]*Stop
func (*ShoppingList) ProtoMessage ¶
func (*ShoppingList) ProtoMessage()
func (*ShoppingList) ProtoReflect ¶
func (x *ShoppingList) ProtoReflect() protoreflect.Message
func (*ShoppingList) Reset ¶
func (x *ShoppingList) Reset()
func (*ShoppingList) String ¶
func (x *ShoppingList) String() string
type Stop ¶
type Stop struct { StoreName string `protobuf:"bytes,1,opt,name=store_name,json=storeName,proto3" json:"store_name,omitempty"` StoreLocation string `protobuf:"bytes,2,opt,name=store_location,json=storeLocation,proto3" json:"store_location,omitempty"` Items map[string]*Item `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Stop) Descriptor
deprecated
func (*Stop) GetStoreLocation ¶
func (*Stop) GetStoreName ¶
func (*Stop) ProtoMessage ¶
func (*Stop) ProtoMessage()
func (*Stop) ProtoReflect ¶
func (x *Stop) ProtoReflect() protoreflect.Message
type UnimplementedDepotServiceServer ¶
type UnimplementedDepotServiceServer struct { }
UnimplementedDepotServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDepotServiceServer) AssignShoppingList ¶
func (UnimplementedDepotServiceServer) AssignShoppingList(context.Context, *AssignShoppingListRequest) (*AssignShoppingListResponse, error)
func (UnimplementedDepotServiceServer) CancelShoppingList ¶
func (UnimplementedDepotServiceServer) CancelShoppingList(context.Context, *CancelShoppingListRequest) (*CancelShoppingListResponse, error)
func (UnimplementedDepotServiceServer) CompleteShoppingList ¶
func (UnimplementedDepotServiceServer) CompleteShoppingList(context.Context, *CompleteShoppingListRequest) (*CompleteShoppingListResponse, error)
func (UnimplementedDepotServiceServer) CreateShoppingList ¶
func (UnimplementedDepotServiceServer) CreateShoppingList(context.Context, *CreateShoppingListRequest) (*CreateShoppingListResponse, error)
type UnsafeDepotServiceServer ¶
type UnsafeDepotServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDepotServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DepotServiceServer will result in compilation errors.