1
0
mirror of https://github.com/hexolan/stocklet.git synced 2026-12-01 03:09:10 +00:00

chore!: regen proto definitions

Signed-off-by: Declan Teevan <dt@hexolan.com>
This commit is contained in:
2026-11-19 06:45:42 +00:00
parent d25f58a6b6
commit d05489c01b
37 changed files with 2052 additions and 4257 deletions
+58 -207
View File
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.36.12
// protoc (unknown)
// source: stocklet/warehouse/v1/service.proto
@@ -32,6 +32,7 @@ import (
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -42,20 +43,17 @@ const (
)
type ViewProductStockRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
unknownFields protoimpl.UnknownFields
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *ViewProductStockRequest) Reset() {
*x = ViewProductStockRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ViewProductStockRequest) String() string {
@@ -66,7 +64,7 @@ func (*ViewProductStockRequest) ProtoMessage() {}
func (x *ViewProductStockRequest) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -89,20 +87,17 @@ func (x *ViewProductStockRequest) GetProductId() string {
}
type ViewProductStockResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Stock *ProductStock `protobuf:"bytes,1,opt,name=stock,proto3" json:"stock,omitempty"`
unknownFields protoimpl.UnknownFields
Stock *ProductStock `protobuf:"bytes,1,opt,name=stock,proto3" json:"stock,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *ViewProductStockResponse) Reset() {
*x = ViewProductStockResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ViewProductStockResponse) String() string {
@@ -113,7 +108,7 @@ func (*ViewProductStockResponse) ProtoMessage() {}
func (x *ViewProductStockResponse) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -136,20 +131,17 @@ func (x *ViewProductStockResponse) GetStock() *ProductStock {
}
type ViewReservationRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
ReservationId string `protobuf:"bytes,1,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"`
unknownFields protoimpl.UnknownFields
ReservationId string `protobuf:"bytes,1,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *ViewReservationRequest) Reset() {
*x = ViewReservationRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ViewReservationRequest) String() string {
@@ -160,7 +152,7 @@ func (*ViewReservationRequest) ProtoMessage() {}
func (x *ViewReservationRequest) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -183,20 +175,17 @@ func (x *ViewReservationRequest) GetReservationId() string {
}
type ViewReservationResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Reservation *Reservation `protobuf:"bytes,1,opt,name=reservation,proto3" json:"reservation,omitempty"`
unknownFields protoimpl.UnknownFields
Reservation *Reservation `protobuf:"bytes,1,opt,name=reservation,proto3" json:"reservation,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *ViewReservationResponse) Reset() {
*x = ViewReservationResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ViewReservationResponse) String() string {
@@ -207,7 +196,7 @@ func (*ViewReservationResponse) ProtoMessage() {}
func (x *ViewReservationResponse) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_warehouse_v1_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -231,132 +220,45 @@ func (x *ViewReservationResponse) GetReservation() *Reservation {
var File_stocklet_warehouse_v1_service_proto protoreflect.FileDescriptor
var file_stocklet_warehouse_v1_service_proto_rawDesc = []byte{
0x0a, 0x23, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68,
0x6f, 0x75, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e,
0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75,
0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x21, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74,
0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75,
0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c,
0x65, 0x74, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x68, 0x69,
0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x73, 0x74, 0x6f,
0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2f,
0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41,
0x0a, 0x17, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x74, 0x6f,
0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x72, 0x6f,
0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba,
0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49,
0x64, 0x22, 0x55, 0x0a, 0x18, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a,
0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73,
0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x63,
0x6b, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x48, 0x0a, 0x16, 0x56, 0x69, 0x65, 0x77,
0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72,
0x02, 0x10, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x64, 0x22, 0x5f, 0x0a, 0x17, 0x56, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a,
0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61,
0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72,
0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x32, 0xa6, 0x07, 0x0a, 0x10, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73,
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c,
0x65, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x27, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17,
0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2f,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x10, 0x56, 0x69, 0x65, 0x77,
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x2e, 0x2e, 0x73,
0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73,
0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68,
0x6f, 0x75, 0x73, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x0f, 0x56, 0x69,
0x65, 0x77, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e,
0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75,
0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73,
0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f,
0x75, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,
0x7b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d,
0x12, 0x6f, 0x0a, 0x1a, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x64, 0x75,
0x63, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x27,
0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41,
0x4c, 0x12, 0x6b, 0x0a, 0x18, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e,
0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e,
0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10, 0xfa, 0xd2,
0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x12, 0x77,
0x0a, 0x1e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x68, 0x69, 0x70, 0x6d, 0x65, 0x6e,
0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x12, 0x2b, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6c,
0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49,
0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x12, 0x73, 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c,
0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10, 0xfa, 0xd2, 0xe4, 0x93,
0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x42, 0x4d, 0x5a, 0x4b,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x65, 0x78, 0x6f, 0x6c,
0x61, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65,
0x6e, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x77,
0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
const file_stocklet_warehouse_v1_service_proto_rawDesc = "" +
"\n" +
"#stocklet/warehouse/v1/service.proto\x12\x15stocklet.warehouse.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/api/visibility.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a!stocklet/common/v1/requests.proto\x1a\x1estocklet/events/v1/order.proto\x1a stocklet/events/v1/payment.proto\x1a stocklet/events/v1/product.proto\x1a!stocklet/events/v1/shipping.proto\x1a!stocklet/warehouse/v1/types.proto\"A\n" +
"\x17ViewProductStockRequest\x12&\n" +
"\n" +
"product_id\x18\x01 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\tproductId\"U\n" +
"\x18ViewProductStockResponse\x129\n" +
"\x05stock\x18\x01 \x01(\v2#.stocklet.warehouse.v1.ProductStockR\x05stock\"H\n" +
"\x16ViewReservationRequest\x12.\n" +
"\x0ereservation_id\x18\x01 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\rreservationId\"_\n" +
"\x17ViewReservationResponse\x12D\n" +
"\vreservation\x18\x01 \x01(\v2\".stocklet.warehouse.v1.ReservationR\vreservation2\xa6\a\n" +
"\x10WarehouseService\x12}\n" +
"\vServiceInfo\x12&.stocklet.common.v1.ServiceInfoRequest\x1a'.stocklet.common.v1.ServiceInfoResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/warehouse/service\x12\x9f\x01\n" +
"\x10ViewProductStock\x12..stocklet.warehouse.v1.ViewProductStockRequest\x1a/.stocklet.warehouse.v1.ViewProductStockResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/warehouse/product/{product_id}\x12\xa4\x01\n" +
"\x0fViewReservation\x12-.stocklet.warehouse.v1.ViewReservationRequest\x1a..stocklet.warehouse.v1.ViewReservationResponse\"2\x82\xd3\xe4\x93\x02,\x12*/v1/warehouse/reservation/{reservation_id}\x12o\n" +
"\x1aProcessProductCreatedEvent\x12'.stocklet.events.v1.ProductCreatedEvent\x1a\x16.google.protobuf.Empty\"\x10\xfa\xd2\xe4\x93\x02\n" +
"\x12\bINTERNAL\x12k\n" +
"\x18ProcessOrderPendingEvent\x12%.stocklet.events.v1.OrderPendingEvent\x1a\x16.google.protobuf.Empty\"\x10\xfa\xd2\xe4\x93\x02\n" +
"\x12\bINTERNAL\x12w\n" +
"\x1eProcessShipmentAllocationEvent\x12+.stocklet.events.v1.ShipmentAllocationEvent\x1a\x16.google.protobuf.Empty\"\x10\xfa\xd2\xe4\x93\x02\n" +
"\x12\bINTERNAL\x12s\n" +
"\x1cProcessPaymentProcessedEvent\x12).stocklet.events.v1.PaymentProcessedEvent\x1a\x16.google.protobuf.Empty\"\x10\xfa\xd2\xe4\x93\x02\n" +
"\x12\bINTERNALBMZKgithub.com/hexolan/stocklet/internal/pkg/protogen/warehouse/v1;warehouse_v1b\x06proto3"
var (
file_stocklet_warehouse_v1_service_proto_rawDescOnce sync.Once
file_stocklet_warehouse_v1_service_proto_rawDescData = file_stocklet_warehouse_v1_service_proto_rawDesc
file_stocklet_warehouse_v1_service_proto_rawDescData []byte
)
func file_stocklet_warehouse_v1_service_proto_rawDescGZIP() []byte {
file_stocklet_warehouse_v1_service_proto_rawDescOnce.Do(func() {
file_stocklet_warehouse_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_warehouse_v1_service_proto_rawDescData)
file_stocklet_warehouse_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stocklet_warehouse_v1_service_proto_rawDesc), len(file_stocklet_warehouse_v1_service_proto_rawDesc)))
})
return file_stocklet_warehouse_v1_service_proto_rawDescData
}
var file_stocklet_warehouse_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_stocklet_warehouse_v1_service_proto_goTypes = []interface{}{
var file_stocklet_warehouse_v1_service_proto_goTypes = []any{
(*ViewProductStockRequest)(nil), // 0: stocklet.warehouse.v1.ViewProductStockRequest
(*ViewProductStockResponse)(nil), // 1: stocklet.warehouse.v1.ViewProductStockResponse
(*ViewReservationRequest)(nil), // 2: stocklet.warehouse.v1.ViewReservationRequest
@@ -401,61 +303,11 @@ func file_stocklet_warehouse_v1_service_proto_init() {
return
}
file_stocklet_warehouse_v1_types_proto_init()
if !protoimpl.UnsafeEnabled {
file_stocklet_warehouse_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ViewProductStockRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_warehouse_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ViewProductStockResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_warehouse_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ViewReservationRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_warehouse_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ViewReservationResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stocklet_warehouse_v1_service_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_stocklet_warehouse_v1_service_proto_rawDesc), len(file_stocklet_warehouse_v1_service_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
@@ -466,7 +318,6 @@ func file_stocklet_warehouse_v1_service_proto_init() {
MessageInfos: file_stocklet_warehouse_v1_service_proto_msgTypes,
}.Build()
File_stocklet_warehouse_v1_service_proto = out.File
file_stocklet_warehouse_v1_service_proto_rawDesc = nil
file_stocklet_warehouse_v1_service_proto_goTypes = nil
file_stocklet_warehouse_v1_service_proto_depIdxs = nil
}
@@ -10,6 +10,7 @@ package warehouse_v1
import (
"context"
"errors"
"io"
"net/http"
@@ -25,150 +26,128 @@ import (
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
var (
_ codes.Code
_ io.Reader
_ status.Status
_ = errors.New
_ = runtime.String
_ = utilities.NewDoubleArray
_ = metadata.Join
)
func request_WarehouseService_ServiceInfo_0(ctx context.Context, marshaler runtime.Marshaler, client WarehouseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq common_v1.ServiceInfoRequest
var metadata runtime.ServerMetadata
var (
protoReq common_v1.ServiceInfoRequest
metadata runtime.ServerMetadata
)
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.ServiceInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WarehouseService_ServiceInfo_0(ctx context.Context, marshaler runtime.Marshaler, server WarehouseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq common_v1.ServiceInfoRequest
var metadata runtime.ServerMetadata
var (
protoReq common_v1.ServiceInfoRequest
metadata runtime.ServerMetadata
)
msg, err := server.ServiceInfo(ctx, &protoReq)
return msg, metadata, err
}
func request_WarehouseService_ViewProductStock_0(ctx context.Context, marshaler runtime.Marshaler, client WarehouseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ViewProductStockRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
protoReq ViewProductStockRequest
metadata runtime.ServerMetadata
err error
)
val, ok = pathParams["product_id"]
val, ok := pathParams["product_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "product_id")
}
protoReq.ProductId, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "product_id", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.ViewProductStock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WarehouseService_ViewProductStock_0(ctx context.Context, marshaler runtime.Marshaler, server WarehouseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ViewProductStockRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
protoReq ViewProductStockRequest
metadata runtime.ServerMetadata
err error
)
val, ok = pathParams["product_id"]
val, ok := pathParams["product_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "product_id")
}
protoReq.ProductId, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "product_id", err)
}
msg, err := server.ViewProductStock(ctx, &protoReq)
return msg, metadata, err
}
func request_WarehouseService_ViewReservation_0(ctx context.Context, marshaler runtime.Marshaler, client WarehouseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ViewReservationRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
protoReq ViewReservationRequest
metadata runtime.ServerMetadata
err error
)
val, ok = pathParams["reservation_id"]
val, ok := pathParams["reservation_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "reservation_id")
}
protoReq.ReservationId, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reservation_id", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
msg, err := client.ViewReservation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WarehouseService_ViewReservation_0(ctx context.Context, marshaler runtime.Marshaler, server WarehouseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ViewReservationRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
protoReq ViewReservationRequest
metadata runtime.ServerMetadata
err error
)
val, ok = pathParams["reservation_id"]
val, ok := pathParams["reservation_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "reservation_id")
}
protoReq.ReservationId, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reservation_id", err)
}
msg, err := server.ViewReservation(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWarehouseServiceHandlerServer registers the http handlers for service WarehouseService to "mux".
// UnaryRPC :call WarehouseServiceServer 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 RegisterWarehouseServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterWarehouseServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WarehouseServiceServer) error {
mux.Handle("GET", pattern_WarehouseService_ServiceInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle(http.MethodGet, pattern_WarehouseService_ServiceInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ServiceInfo", runtime.WithHTTPPathPattern("/v1/warehouse/service"))
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ServiceInfo", runtime.WithHTTPPathPattern("/v1/warehouse/service"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -180,20 +159,15 @@ func RegisterWarehouseServiceHandlerServer(ctx context.Context, mux *runtime.Ser
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WarehouseService_ServiceInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WarehouseService_ViewProductStock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle(http.MethodGet, pattern_WarehouseService_ViewProductStock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewProductStock", runtime.WithHTTPPathPattern("/v1/warehouse/product/{product_id}"))
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewProductStock", runtime.WithHTTPPathPattern("/v1/warehouse/product/{product_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -205,20 +179,15 @@ func RegisterWarehouseServiceHandlerServer(ctx context.Context, mux *runtime.Ser
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WarehouseService_ViewProductStock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WarehouseService_ViewReservation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle(http.MethodGet, pattern_WarehouseService_ViewReservation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewReservation", runtime.WithHTTPPathPattern("/v1/warehouse/reservation/{reservation_id}"))
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewReservation", runtime.WithHTTPPathPattern("/v1/warehouse/reservation/{reservation_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -230,9 +199,7 @@ func RegisterWarehouseServiceHandlerServer(ctx context.Context, mux *runtime.Ser
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WarehouseService_ViewReservation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
@@ -241,25 +208,24 @@ func RegisterWarehouseServiceHandlerServer(ctx context.Context, mux *runtime.Ser
// RegisterWarehouseServiceHandlerFromEndpoint is same as RegisterWarehouseServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterWarehouseServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.DialContext(ctx, endpoint, opts...)
conn, err := grpc.NewClient(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterWarehouseServiceHandler(ctx, mux, conn)
}
@@ -273,16 +239,13 @@ func RegisterWarehouseServiceHandler(ctx context.Context, mux *runtime.ServeMux,
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WarehouseServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WarehouseServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "WarehouseServiceClient" to call the correct interceptors.
// "WarehouseServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterWarehouseServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WarehouseServiceClient) error {
mux.Handle("GET", pattern_WarehouseService_ServiceInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle(http.MethodGet, pattern_WarehouseService_ServiceInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ServiceInfo", runtime.WithHTTPPathPattern("/v1/warehouse/service"))
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ServiceInfo", runtime.WithHTTPPathPattern("/v1/warehouse/service"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -293,18 +256,13 @@ func RegisterWarehouseServiceHandlerClient(ctx context.Context, mux *runtime.Ser
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WarehouseService_ServiceInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WarehouseService_ViewProductStock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle(http.MethodGet, pattern_WarehouseService_ViewProductStock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewProductStock", runtime.WithHTTPPathPattern("/v1/warehouse/product/{product_id}"))
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewProductStock", runtime.WithHTTPPathPattern("/v1/warehouse/product/{product_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -315,18 +273,13 @@ func RegisterWarehouseServiceHandlerClient(ctx context.Context, mux *runtime.Ser
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WarehouseService_ViewProductStock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WarehouseService_ViewReservation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle(http.MethodGet, pattern_WarehouseService_ViewReservation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewReservation", runtime.WithHTTPPathPattern("/v1/warehouse/reservation/{reservation_id}"))
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/stocklet.warehouse.v1.WarehouseService/ViewReservation", runtime.WithHTTPPathPattern("/v1/warehouse/reservation/{reservation_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -337,26 +290,19 @@ func RegisterWarehouseServiceHandlerClient(ctx context.Context, mux *runtime.Ser
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WarehouseService_ViewReservation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_WarehouseService_ServiceInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "warehouse", "service"}, ""))
pattern_WarehouseService_ServiceInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "warehouse", "service"}, ""))
pattern_WarehouseService_ViewProductStock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "warehouse", "product", "product_id"}, ""))
pattern_WarehouseService_ViewReservation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "warehouse", "reservation", "reservation_id"}, ""))
pattern_WarehouseService_ViewReservation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "warehouse", "reservation", "reservation_id"}, ""))
)
var (
forward_WarehouseService_ServiceInfo_0 = runtime.ForwardResponseMessage
forward_WarehouseService_ServiceInfo_0 = runtime.ForwardResponseMessage
forward_WarehouseService_ViewProductStock_0 = runtime.ForwardResponseMessage
forward_WarehouseService_ViewReservation_0 = runtime.ForwardResponseMessage
forward_WarehouseService_ViewReservation_0 = runtime.ForwardResponseMessage
)
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: stocklet/warehouse/v1/service.proto
@@ -33,8 +33,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
WarehouseService_ServiceInfo_FullMethodName = "/stocklet.warehouse.v1.WarehouseService/ServiceInfo"
@@ -91,8 +91,9 @@ func NewWarehouseServiceClient(cc grpc.ClientConnInterface) WarehouseServiceClie
}
func (c *warehouseServiceClient) ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(v1.ServiceInfoResponse)
err := c.cc.Invoke(ctx, WarehouseService_ServiceInfo_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, WarehouseService_ServiceInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -100,8 +101,9 @@ func (c *warehouseServiceClient) ServiceInfo(ctx context.Context, in *v1.Service
}
func (c *warehouseServiceClient) ViewProductStock(ctx context.Context, in *ViewProductStockRequest, opts ...grpc.CallOption) (*ViewProductStockResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ViewProductStockResponse)
err := c.cc.Invoke(ctx, WarehouseService_ViewProductStock_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, WarehouseService_ViewProductStock_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -109,8 +111,9 @@ func (c *warehouseServiceClient) ViewProductStock(ctx context.Context, in *ViewP
}
func (c *warehouseServiceClient) ViewReservation(ctx context.Context, in *ViewReservationRequest, opts ...grpc.CallOption) (*ViewReservationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ViewReservationResponse)
err := c.cc.Invoke(ctx, WarehouseService_ViewReservation_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, WarehouseService_ViewReservation_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -118,8 +121,9 @@ func (c *warehouseServiceClient) ViewReservation(ctx context.Context, in *ViewRe
}
func (c *warehouseServiceClient) ProcessProductCreatedEvent(ctx context.Context, in *v11.ProductCreatedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, WarehouseService_ProcessProductCreatedEvent_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, WarehouseService_ProcessProductCreatedEvent_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -127,8 +131,9 @@ func (c *warehouseServiceClient) ProcessProductCreatedEvent(ctx context.Context,
}
func (c *warehouseServiceClient) ProcessOrderPendingEvent(ctx context.Context, in *v11.OrderPendingEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, WarehouseService_ProcessOrderPendingEvent_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, WarehouseService_ProcessOrderPendingEvent_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -136,8 +141,9 @@ func (c *warehouseServiceClient) ProcessOrderPendingEvent(ctx context.Context, i
}
func (c *warehouseServiceClient) ProcessShipmentAllocationEvent(ctx context.Context, in *v11.ShipmentAllocationEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, WarehouseService_ProcessShipmentAllocationEvent_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, WarehouseService_ProcessShipmentAllocationEvent_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -145,8 +151,9 @@ func (c *warehouseServiceClient) ProcessShipmentAllocationEvent(ctx context.Cont
}
func (c *warehouseServiceClient) ProcessPaymentProcessedEvent(ctx context.Context, in *v11.PaymentProcessedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, WarehouseService_ProcessPaymentProcessedEvent_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, WarehouseService_ProcessPaymentProcessedEvent_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -155,7 +162,7 @@ func (c *warehouseServiceClient) ProcessPaymentProcessedEvent(ctx context.Contex
// WarehouseServiceServer is the server API for WarehouseService service.
// All implementations must embed UnimplementedWarehouseServiceServer
// for forward compatibility
// for forward compatibility.
type WarehouseServiceServer interface {
// View information about the service.
//
@@ -190,32 +197,36 @@ type WarehouseServiceServer interface {
mustEmbedUnimplementedWarehouseServiceServer()
}
// UnimplementedWarehouseServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWarehouseServiceServer struct {
}
// UnimplementedWarehouseServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedWarehouseServiceServer struct{}
func (UnimplementedWarehouseServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ServiceInfo not implemented")
return nil, status.Error(codes.Unimplemented, "method ServiceInfo not implemented")
}
func (UnimplementedWarehouseServiceServer) ViewProductStock(context.Context, *ViewProductStockRequest) (*ViewProductStockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ViewProductStock not implemented")
return nil, status.Error(codes.Unimplemented, "method ViewProductStock not implemented")
}
func (UnimplementedWarehouseServiceServer) ViewReservation(context.Context, *ViewReservationRequest) (*ViewReservationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ViewReservation not implemented")
return nil, status.Error(codes.Unimplemented, "method ViewReservation not implemented")
}
func (UnimplementedWarehouseServiceServer) ProcessProductCreatedEvent(context.Context, *v11.ProductCreatedEvent) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProcessProductCreatedEvent not implemented")
return nil, status.Error(codes.Unimplemented, "method ProcessProductCreatedEvent not implemented")
}
func (UnimplementedWarehouseServiceServer) ProcessOrderPendingEvent(context.Context, *v11.OrderPendingEvent) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProcessOrderPendingEvent not implemented")
return nil, status.Error(codes.Unimplemented, "method ProcessOrderPendingEvent not implemented")
}
func (UnimplementedWarehouseServiceServer) ProcessShipmentAllocationEvent(context.Context, *v11.ShipmentAllocationEvent) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProcessShipmentAllocationEvent not implemented")
return nil, status.Error(codes.Unimplemented, "method ProcessShipmentAllocationEvent not implemented")
}
func (UnimplementedWarehouseServiceServer) ProcessPaymentProcessedEvent(context.Context, *v11.PaymentProcessedEvent) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProcessPaymentProcessedEvent not implemented")
return nil, status.Error(codes.Unimplemented, "method ProcessPaymentProcessedEvent not implemented")
}
func (UnimplementedWarehouseServiceServer) mustEmbedUnimplementedWarehouseServiceServer() {}
func (UnimplementedWarehouseServiceServer) testEmbeddedByValue() {}
// UnsafeWarehouseServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WarehouseServiceServer will
@@ -225,6 +236,13 @@ type UnsafeWarehouseServiceServer interface {
}
func RegisterWarehouseServiceServer(s grpc.ServiceRegistrar, srv WarehouseServiceServer) {
// If the following call panics, it indicates UnimplementedWarehouseServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&WarehouseService_ServiceDesc, srv)
}
+49 -116
View File
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.36.12
// protoc (unknown)
// source: stocklet/warehouse/v1/types.proto
@@ -27,6 +27,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -37,21 +38,18 @@ const (
)
type ProductStock struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
unknownFields protoimpl.UnknownFields
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *ProductStock) Reset() {
*x = ProductStock{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ProductStock) String() string {
@@ -62,7 +60,7 @@ func (*ProductStock) ProtoMessage() {}
func (x *ProductStock) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -92,23 +90,20 @@ func (x *ProductStock) GetQuantity() int32 {
}
type Reservation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
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"`
ReservedStock []*ReservationStock `protobuf:"bytes,3,rep,name=reserved_stock,json=reservedStock,proto3" json:"reserved_stock,omitempty"`
CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
unknownFields protoimpl.UnknownFields
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"`
ReservedStock []*ReservationStock `protobuf:"bytes,3,rep,name=reserved_stock,json=reservedStock,proto3" json:"reserved_stock,omitempty"`
CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *Reservation) Reset() {
*x = Reservation{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Reservation) String() string {
@@ -119,7 +114,7 @@ func (*Reservation) ProtoMessage() {}
func (x *Reservation) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -163,21 +158,18 @@ func (x *Reservation) GetCreatedAt() int64 {
}
type ReservationStock struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
unknownFields protoimpl.UnknownFields
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *ReservationStock) Reset() {
*x = ReservationStock{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ReservationStock) String() string {
@@ -188,7 +180,7 @@ func (*ReservationStock) ProtoMessage() {}
func (x *ReservationStock) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_warehouse_v1_types_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -219,58 +211,38 @@ func (x *ReservationStock) GetQuantity() int32 {
var File_stocklet_warehouse_v1_types_proto protoreflect.FileDescriptor
var file_stocklet_warehouse_v1_types_proto_rawDesc = []byte{
0x0a, 0x21, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68,
0x6f, 0x75, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x15, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61,
0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x64, 0x75,
0x63, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75,
0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04,
0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12,
0x23, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x22, 0xb9, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a,
0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49,
0x64, 0x12, 0x4e, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x73, 0x74,
0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x74, 0x6f, 0x63,
0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x6f,
0x63, 0x6b, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x63,
0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
0x22, 0x5f, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
0x74, 0x6f, 0x63, 0x6b, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10,
0x01, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x08,
0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07,
0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74,
0x79, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x68, 0x65, 0x78, 0x6f, 0x6c, 0x61, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74,
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65,
0x2f, 0x76, 0x31, 0x3b, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x76, 0x31,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
const file_stocklet_warehouse_v1_types_proto_rawDesc = "" +
"\n" +
"!stocklet/warehouse/v1/types.proto\x12\x15stocklet.warehouse.v1\x1a\x1bbuf/validate/validate.proto\"[\n" +
"\fProductStock\x12&\n" +
"\n" +
"product_id\x18\x01 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\tproductId\x12#\n" +
"\bquantity\x18\x02 \x01(\x05B\a\xbaH\x04\x1a\x02(\x00R\bquantity\"\xb9\x01\n" +
"\vReservation\x12\x17\n" +
"\x02id\x18\x01 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\x02id\x12\"\n" +
"\border_id\x18\x02 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\aorderId\x12N\n" +
"\x0ereserved_stock\x18\x03 \x03(\v2'.stocklet.warehouse.v1.ReservationStockR\rreservedStock\x12\x1d\n" +
"\n" +
"created_at\x18\x04 \x01(\x03R\tcreatedAt\"_\n" +
"\x10ReservationStock\x12&\n" +
"\n" +
"product_id\x18\x01 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\tproductId\x12#\n" +
"\bquantity\x18\x02 \x01(\x05B\a\xbaH\x04\x1a\x02(\x00R\bquantityBMZKgithub.com/hexolan/stocklet/internal/pkg/protogen/warehouse/v1;warehouse_v1b\x06proto3"
var (
file_stocklet_warehouse_v1_types_proto_rawDescOnce sync.Once
file_stocklet_warehouse_v1_types_proto_rawDescData = file_stocklet_warehouse_v1_types_proto_rawDesc
file_stocklet_warehouse_v1_types_proto_rawDescData []byte
)
func file_stocklet_warehouse_v1_types_proto_rawDescGZIP() []byte {
file_stocklet_warehouse_v1_types_proto_rawDescOnce.Do(func() {
file_stocklet_warehouse_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_warehouse_v1_types_proto_rawDescData)
file_stocklet_warehouse_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stocklet_warehouse_v1_types_proto_rawDesc), len(file_stocklet_warehouse_v1_types_proto_rawDesc)))
})
return file_stocklet_warehouse_v1_types_proto_rawDescData
}
var file_stocklet_warehouse_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_stocklet_warehouse_v1_types_proto_goTypes = []interface{}{
var file_stocklet_warehouse_v1_types_proto_goTypes = []any{
(*ProductStock)(nil), // 0: stocklet.warehouse.v1.ProductStock
(*Reservation)(nil), // 1: stocklet.warehouse.v1.Reservation
(*ReservationStock)(nil), // 2: stocklet.warehouse.v1.ReservationStock
@@ -289,49 +261,11 @@ func file_stocklet_warehouse_v1_types_proto_init() {
if File_stocklet_warehouse_v1_types_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_warehouse_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProductStock); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_warehouse_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Reservation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_warehouse_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReservationStock); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stocklet_warehouse_v1_types_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_stocklet_warehouse_v1_types_proto_rawDesc), len(file_stocklet_warehouse_v1_types_proto_rawDesc)),
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
@@ -342,7 +276,6 @@ func file_stocklet_warehouse_v1_types_proto_init() {
MessageInfos: file_stocklet_warehouse_v1_types_proto_msgTypes,
}.Build()
File_stocklet_warehouse_v1_types_proto = out.File
file_stocklet_warehouse_v1_types_proto_rawDesc = nil
file_stocklet_warehouse_v1_types_proto_goTypes = nil
file_stocklet_warehouse_v1_types_proto_depIdxs = nil
}