chore: initial commit

This commit is contained in:
2024-04-16 22:27:52 +01:00
commit 531b5dabe2
194 changed files with 27071 additions and 0 deletions

View File

@@ -0,0 +1,521 @@
// Copyright (C) 2024 Declan Teevan
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: stocklet/events/v1/order.proto
package events_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Order Status = processing
type OrderCreatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
CustomerId string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
ItemQuantities map[string]int32 `protobuf:"bytes,4,rep,name=item_quantities,json=itemQuantities,proto3" json:"item_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *OrderCreatedEvent) Reset() {
*x = OrderCreatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_order_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderCreatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderCreatedEvent) ProtoMessage() {}
func (x *OrderCreatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_order_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderCreatedEvent.ProtoReflect.Descriptor instead.
func (*OrderCreatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{0}
}
func (x *OrderCreatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *OrderCreatedEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *OrderCreatedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *OrderCreatedEvent) GetItemQuantities() map[string]int32 {
if x != nil {
return x.ItemQuantities
}
return nil
}
// Order Status = pending
type OrderPendingEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
CustomerId string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
ItemQuantities map[string]int32 `protobuf:"bytes,4,rep,name=item_quantities,json=itemQuantities,proto3" json:"item_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
ItemsPrice float32 `protobuf:"fixed32,5,opt,name=items_price,json=itemsPrice,proto3" json:"items_price,omitempty"`
TotalPrice float32 `protobuf:"fixed32,6,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`
}
func (x *OrderPendingEvent) Reset() {
*x = OrderPendingEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_order_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderPendingEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderPendingEvent) ProtoMessage() {}
func (x *OrderPendingEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_order_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderPendingEvent.ProtoReflect.Descriptor instead.
func (*OrderPendingEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{1}
}
func (x *OrderPendingEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *OrderPendingEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *OrderPendingEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *OrderPendingEvent) GetItemQuantities() map[string]int32 {
if x != nil {
return x.ItemQuantities
}
return nil
}
func (x *OrderPendingEvent) GetItemsPrice() float32 {
if x != nil {
return x.ItemsPrice
}
return 0
}
func (x *OrderPendingEvent) GetTotalPrice() float32 {
if x != nil {
return x.TotalPrice
}
return 0
}
// Order Status = rejected
type OrderRejectedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
TransactionId *string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"`
ShippingId *string `protobuf:"bytes,4,opt,name=shipping_id,json=shippingId,proto3,oneof" json:"shipping_id,omitempty"`
}
func (x *OrderRejectedEvent) Reset() {
*x = OrderRejectedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_order_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderRejectedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderRejectedEvent) ProtoMessage() {}
func (x *OrderRejectedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_order_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderRejectedEvent.ProtoReflect.Descriptor instead.
func (*OrderRejectedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{2}
}
func (x *OrderRejectedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *OrderRejectedEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *OrderRejectedEvent) GetTransactionId() string {
if x != nil && x.TransactionId != nil {
return *x.TransactionId
}
return ""
}
func (x *OrderRejectedEvent) GetShippingId() string {
if x != nil && x.ShippingId != nil {
return *x.ShippingId
}
return ""
}
// Order Status = approved
type OrderApprovedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
TransactionId string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
ShippingId string `protobuf:"bytes,4,opt,name=shipping_id,json=shippingId,proto3" json:"shipping_id,omitempty"`
}
func (x *OrderApprovedEvent) Reset() {
*x = OrderApprovedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_order_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderApprovedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderApprovedEvent) ProtoMessage() {}
func (x *OrderApprovedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_order_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderApprovedEvent.ProtoReflect.Descriptor instead.
func (*OrderApprovedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{3}
}
func (x *OrderApprovedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *OrderApprovedEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *OrderApprovedEvent) GetTransactionId() string {
if x != nil {
return x.TransactionId
}
return ""
}
func (x *OrderApprovedEvent) GetShippingId() string {
if x != nil {
return x.ShippingId
}
return ""
}
var File_stocklet_events_v1_order_proto protoreflect.FileDescriptor
var file_stocklet_events_v1_order_proto_rawDesc = []byte{
0x0a, 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,
0x12, 0x12, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x2e, 0x76, 0x31, 0x22, 0x92, 0x02, 0x0a, 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65,
0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49,
0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
0x49, 0x64, 0x12, 0x62, 0x0a, 0x0f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74,
0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 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, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x69, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x49, 0x74, 0x65, 0x6d, 0x51, 0x75,
0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd4, 0x02, 0x0a, 0x11, 0x4f, 0x72,
0x64, 0x65, 0x72, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12,
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x62, 0x0a, 0x0f, 0x69, 0x74, 0x65, 0x6d, 0x5f,
0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x39, 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, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x69, 0x74, 0x65,
0x6d, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02,
0x52, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x02, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x41, 0x0a,
0x13, 0x49, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0xc0, 0x01, 0x0a, 0x12, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74,
0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a,
0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x68,
0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48,
0x01, 0x52, 0x0a, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x88, 0x01, 0x01,
0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x69, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67,
0x5f, 0x69, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x70, 0x70,
0x72, 0x6f, 0x76, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65,
0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49,
0x64, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73,
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x69, 0x70,
0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x42, 0x47, 0x5a, 0x45, 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, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f,
0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_stocklet_events_v1_order_proto_rawDescOnce sync.Once
file_stocklet_events_v1_order_proto_rawDescData = file_stocklet_events_v1_order_proto_rawDesc
)
func file_stocklet_events_v1_order_proto_rawDescGZIP() []byte {
file_stocklet_events_v1_order_proto_rawDescOnce.Do(func() {
file_stocklet_events_v1_order_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_events_v1_order_proto_rawDescData)
})
return file_stocklet_events_v1_order_proto_rawDescData
}
var file_stocklet_events_v1_order_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_stocklet_events_v1_order_proto_goTypes = []interface{}{
(*OrderCreatedEvent)(nil), // 0: stocklet.events.v1.OrderCreatedEvent
(*OrderPendingEvent)(nil), // 1: stocklet.events.v1.OrderPendingEvent
(*OrderRejectedEvent)(nil), // 2: stocklet.events.v1.OrderRejectedEvent
(*OrderApprovedEvent)(nil), // 3: stocklet.events.v1.OrderApprovedEvent
nil, // 4: stocklet.events.v1.OrderCreatedEvent.ItemQuantitiesEntry
nil, // 5: stocklet.events.v1.OrderPendingEvent.ItemQuantitiesEntry
}
var file_stocklet_events_v1_order_proto_depIdxs = []int32{
4, // 0: stocklet.events.v1.OrderCreatedEvent.item_quantities:type_name -> stocklet.events.v1.OrderCreatedEvent.ItemQuantitiesEntry
5, // 1: stocklet.events.v1.OrderPendingEvent.item_quantities:type_name -> stocklet.events.v1.OrderPendingEvent.ItemQuantitiesEntry
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_stocklet_events_v1_order_proto_init() }
func file_stocklet_events_v1_order_proto_init() {
if File_stocklet_events_v1_order_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_events_v1_order_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderCreatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_order_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderPendingEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_order_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderRejectedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_order_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderApprovedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_stocklet_events_v1_order_proto_msgTypes[2].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stocklet_events_v1_order_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_stocklet_events_v1_order_proto_goTypes,
DependencyIndexes: file_stocklet_events_v1_order_proto_depIdxs,
MessageInfos: file_stocklet_events_v1_order_proto_msgTypes,
}.Build()
File_stocklet_events_v1_order_proto = out.File
file_stocklet_events_v1_order_proto_rawDesc = nil
file_stocklet_events_v1_order_proto_goTypes = nil
file_stocklet_events_v1_order_proto_depIdxs = nil
}

View File

@@ -0,0 +1,833 @@
// Copyright (C) 2024 Declan Teevan
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: stocklet/events/v1/payment.proto
package events_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PaymentProcessedEvent_Type int32
const (
PaymentProcessedEvent_TYPE_UNSPECIFIED PaymentProcessedEvent_Type = 0
PaymentProcessedEvent_TYPE_FAILED PaymentProcessedEvent_Type = 1
PaymentProcessedEvent_TYPE_SUCCESS PaymentProcessedEvent_Type = 2
)
// Enum value maps for PaymentProcessedEvent_Type.
var (
PaymentProcessedEvent_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "TYPE_FAILED",
2: "TYPE_SUCCESS",
}
PaymentProcessedEvent_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"TYPE_FAILED": 1,
"TYPE_SUCCESS": 2,
}
)
func (x PaymentProcessedEvent_Type) Enum() *PaymentProcessedEvent_Type {
p := new(PaymentProcessedEvent_Type)
*p = x
return p
}
func (x PaymentProcessedEvent_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PaymentProcessedEvent_Type) Descriptor() protoreflect.EnumDescriptor {
return file_stocklet_events_v1_payment_proto_enumTypes[0].Descriptor()
}
func (PaymentProcessedEvent_Type) Type() protoreflect.EnumType {
return &file_stocklet_events_v1_payment_proto_enumTypes[0]
}
func (x PaymentProcessedEvent_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PaymentProcessedEvent_Type.Descriptor instead.
func (PaymentProcessedEvent_Type) EnumDescriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{6, 0}
}
type BalanceCreatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
Balance float32 `protobuf:"fixed32,3,opt,name=balance,proto3" json:"balance,omitempty"`
}
func (x *BalanceCreatedEvent) Reset() {
*x = BalanceCreatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BalanceCreatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BalanceCreatedEvent) ProtoMessage() {}
func (x *BalanceCreatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BalanceCreatedEvent.ProtoReflect.Descriptor instead.
func (*BalanceCreatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{0}
}
func (x *BalanceCreatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *BalanceCreatedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *BalanceCreatedEvent) GetBalance() float32 {
if x != nil {
return x.Balance
}
return 0
}
type BalanceCreditedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"`
NewBalance float32 `protobuf:"fixed32,4,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"`
}
func (x *BalanceCreditedEvent) Reset() {
*x = BalanceCreditedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BalanceCreditedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BalanceCreditedEvent) ProtoMessage() {}
func (x *BalanceCreditedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BalanceCreditedEvent.ProtoReflect.Descriptor instead.
func (*BalanceCreditedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{1}
}
func (x *BalanceCreditedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *BalanceCreditedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *BalanceCreditedEvent) GetAmount() float32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *BalanceCreditedEvent) GetNewBalance() float32 {
if x != nil {
return x.NewBalance
}
return 0
}
type BalanceDebitedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"`
NewBalance float32 `protobuf:"fixed32,4,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"`
}
func (x *BalanceDebitedEvent) Reset() {
*x = BalanceDebitedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BalanceDebitedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BalanceDebitedEvent) ProtoMessage() {}
func (x *BalanceDebitedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BalanceDebitedEvent.ProtoReflect.Descriptor instead.
func (*BalanceDebitedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{2}
}
func (x *BalanceDebitedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *BalanceDebitedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *BalanceDebitedEvent) GetAmount() float32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *BalanceDebitedEvent) GetNewBalance() float32 {
if x != nil {
return x.NewBalance
}
return 0
}
type BalanceClosedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
Balance float32 `protobuf:"fixed32,3,opt,name=balance,proto3" json:"balance,omitempty"`
}
func (x *BalanceClosedEvent) Reset() {
*x = BalanceClosedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BalanceClosedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BalanceClosedEvent) ProtoMessage() {}
func (x *BalanceClosedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BalanceClosedEvent.ProtoReflect.Descriptor instead.
func (*BalanceClosedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{3}
}
func (x *BalanceClosedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *BalanceClosedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *BalanceClosedEvent) GetBalance() float32 {
if x != nil {
return x.Balance
}
return 0
}
type TransactionLoggedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"`
OrderId string `protobuf:"bytes,4,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
CustomerId string `protobuf:"bytes,5,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
}
func (x *TransactionLoggedEvent) Reset() {
*x = TransactionLoggedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransactionLoggedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionLoggedEvent) ProtoMessage() {}
func (x *TransactionLoggedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TransactionLoggedEvent.ProtoReflect.Descriptor instead.
func (*TransactionLoggedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{4}
}
func (x *TransactionLoggedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *TransactionLoggedEvent) GetTransactionId() string {
if x != nil {
return x.TransactionId
}
return ""
}
func (x *TransactionLoggedEvent) GetAmount() float32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *TransactionLoggedEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *TransactionLoggedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
type TransactionReversedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"`
OrderId string `protobuf:"bytes,4,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
CustomerId string `protobuf:"bytes,5,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
}
func (x *TransactionReversedEvent) Reset() {
*x = TransactionReversedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransactionReversedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionReversedEvent) ProtoMessage() {}
func (x *TransactionReversedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TransactionReversedEvent.ProtoReflect.Descriptor instead.
func (*TransactionReversedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{5}
}
func (x *TransactionReversedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *TransactionReversedEvent) GetTransactionId() string {
if x != nil {
return x.TransactionId
}
return ""
}
func (x *TransactionReversedEvent) GetAmount() float32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *TransactionReversedEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *TransactionReversedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
type PaymentProcessedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
Type PaymentProcessedEvent_Type `protobuf:"varint,2,opt,name=type,proto3,enum=stocklet.events.v1.PaymentProcessedEvent_Type" json:"type,omitempty"`
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
CustomerId string `protobuf:"bytes,4,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
Amount float32 `protobuf:"fixed32,5,opt,name=amount,proto3" json:"amount,omitempty"`
TransactionId *string `protobuf:"bytes,6,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"`
}
func (x *PaymentProcessedEvent) Reset() {
*x = PaymentProcessedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaymentProcessedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaymentProcessedEvent) ProtoMessage() {}
func (x *PaymentProcessedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_payment_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PaymentProcessedEvent.ProtoReflect.Descriptor instead.
func (*PaymentProcessedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_payment_proto_rawDescGZIP(), []int{6}
}
func (x *PaymentProcessedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *PaymentProcessedEvent) GetType() PaymentProcessedEvent_Type {
if x != nil {
return x.Type
}
return PaymentProcessedEvent_TYPE_UNSPECIFIED
}
func (x *PaymentProcessedEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *PaymentProcessedEvent) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *PaymentProcessedEvent) GetAmount() float32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *PaymentProcessedEvent) GetTransactionId() string {
if x != nil && x.TransactionId != nil {
return *x.TransactionId
}
return ""
}
var File_stocklet_events_v1_payment_proto protoreflect.FileDescriptor
var file_stocklet_events_v1_payment_proto_rawDesc = []byte{
0x0a, 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, 0x12, 0x12, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65,
0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x6c, 0x0a, 0x13, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61,
0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x62, 0x61, 0x6c,
0x61, 0x6e, 0x63, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x44,
0x65, 0x62, 0x69, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72,
0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72,
0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x22, 0x6b, 0x0a, 0x12, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6c, 0x6f, 0x73,
0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xaf,
0x01, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f,
0x67, 0x67, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76,
0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76,
0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74,
0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06,
0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12,
0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64,
0x22, 0xb1, 0x01, 0x0a, 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61,
0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02,
0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x65, 0x72, 0x49, 0x64, 0x22, 0xcb, 0x02, 0x0a, 0x15, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 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, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19,
0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72,
0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x3f,
0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a,
0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x42,
0x11, 0x0a, 0x0f, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x69, 0x64, 0x42, 0x47, 0x5a, 0x45, 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, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76,
0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_stocklet_events_v1_payment_proto_rawDescOnce sync.Once
file_stocklet_events_v1_payment_proto_rawDescData = file_stocklet_events_v1_payment_proto_rawDesc
)
func file_stocklet_events_v1_payment_proto_rawDescGZIP() []byte {
file_stocklet_events_v1_payment_proto_rawDescOnce.Do(func() {
file_stocklet_events_v1_payment_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_events_v1_payment_proto_rawDescData)
})
return file_stocklet_events_v1_payment_proto_rawDescData
}
var file_stocklet_events_v1_payment_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_stocklet_events_v1_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_stocklet_events_v1_payment_proto_goTypes = []interface{}{
(PaymentProcessedEvent_Type)(0), // 0: stocklet.events.v1.PaymentProcessedEvent.Type
(*BalanceCreatedEvent)(nil), // 1: stocklet.events.v1.BalanceCreatedEvent
(*BalanceCreditedEvent)(nil), // 2: stocklet.events.v1.BalanceCreditedEvent
(*BalanceDebitedEvent)(nil), // 3: stocklet.events.v1.BalanceDebitedEvent
(*BalanceClosedEvent)(nil), // 4: stocklet.events.v1.BalanceClosedEvent
(*TransactionLoggedEvent)(nil), // 5: stocklet.events.v1.TransactionLoggedEvent
(*TransactionReversedEvent)(nil), // 6: stocklet.events.v1.TransactionReversedEvent
(*PaymentProcessedEvent)(nil), // 7: stocklet.events.v1.PaymentProcessedEvent
}
var file_stocklet_events_v1_payment_proto_depIdxs = []int32{
0, // 0: stocklet.events.v1.PaymentProcessedEvent.type:type_name -> stocklet.events.v1.PaymentProcessedEvent.Type
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_stocklet_events_v1_payment_proto_init() }
func file_stocklet_events_v1_payment_proto_init() {
if File_stocklet_events_v1_payment_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_events_v1_payment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BalanceCreatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_payment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BalanceCreditedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_payment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BalanceDebitedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_payment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BalanceClosedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_payment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionLoggedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_payment_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionReversedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_payment_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PaymentProcessedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_stocklet_events_v1_payment_proto_msgTypes[6].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stocklet_events_v1_payment_proto_rawDesc,
NumEnums: 1,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_stocklet_events_v1_payment_proto_goTypes,
DependencyIndexes: file_stocklet_events_v1_payment_proto_depIdxs,
EnumInfos: file_stocklet_events_v1_payment_proto_enumTypes,
MessageInfos: file_stocklet_events_v1_payment_proto_msgTypes,
}.Build()
File_stocklet_events_v1_payment_proto = out.File
file_stocklet_events_v1_payment_proto_rawDesc = nil
file_stocklet_events_v1_payment_proto_goTypes = nil
file_stocklet_events_v1_payment_proto_depIdxs = nil
}

View File

@@ -0,0 +1,555 @@
// Copyright (C) 2024 Declan Teevan
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: stocklet/events/v1/product.proto
package events_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ProductPriceQuoteEvent_Type int32
const (
ProductPriceQuoteEvent_TYPE_UNSPECIFIED ProductPriceQuoteEvent_Type = 0
ProductPriceQuoteEvent_TYPE_UNAVALIABLE ProductPriceQuoteEvent_Type = 1
ProductPriceQuoteEvent_TYPE_AVALIABLE ProductPriceQuoteEvent_Type = 2
)
// Enum value maps for ProductPriceQuoteEvent_Type.
var (
ProductPriceQuoteEvent_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "TYPE_UNAVALIABLE",
2: "TYPE_AVALIABLE",
}
ProductPriceQuoteEvent_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"TYPE_UNAVALIABLE": 1,
"TYPE_AVALIABLE": 2,
}
)
func (x ProductPriceQuoteEvent_Type) Enum() *ProductPriceQuoteEvent_Type {
p := new(ProductPriceQuoteEvent_Type)
*p = x
return p
}
func (x ProductPriceQuoteEvent_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ProductPriceQuoteEvent_Type) Descriptor() protoreflect.EnumDescriptor {
return file_stocklet_events_v1_product_proto_enumTypes[0].Descriptor()
}
func (ProductPriceQuoteEvent_Type) Type() protoreflect.EnumType {
return &file_stocklet_events_v1_product_proto_enumTypes[0]
}
func (x ProductPriceQuoteEvent_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ProductPriceQuoteEvent_Type.Descriptor instead.
func (ProductPriceQuoteEvent_Type) EnumDescriptor() ([]byte, []int) {
return file_stocklet_events_v1_product_proto_rawDescGZIP(), []int{3, 0}
}
type ProductCreatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Price float32 `protobuf:"fixed32,5,opt,name=price,proto3" json:"price,omitempty"`
}
func (x *ProductCreatedEvent) Reset() {
*x = ProductCreatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_product_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProductCreatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProductCreatedEvent) ProtoMessage() {}
func (x *ProductCreatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_product_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProductCreatedEvent.ProtoReflect.Descriptor instead.
func (*ProductCreatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_product_proto_rawDescGZIP(), []int{0}
}
func (x *ProductCreatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *ProductCreatedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *ProductCreatedEvent) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ProductCreatedEvent) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *ProductCreatedEvent) GetPrice() float32 {
if x != nil {
return x.Price
}
return 0
}
type ProductPriceUpdatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"`
}
func (x *ProductPriceUpdatedEvent) Reset() {
*x = ProductPriceUpdatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_product_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProductPriceUpdatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProductPriceUpdatedEvent) ProtoMessage() {}
func (x *ProductPriceUpdatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_product_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProductPriceUpdatedEvent.ProtoReflect.Descriptor instead.
func (*ProductPriceUpdatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_product_proto_rawDescGZIP(), []int{1}
}
func (x *ProductPriceUpdatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *ProductPriceUpdatedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *ProductPriceUpdatedEvent) GetPrice() float32 {
if x != nil {
return x.Price
}
return 0
}
type ProductDeletedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
}
func (x *ProductDeletedEvent) Reset() {
*x = ProductDeletedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_product_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProductDeletedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProductDeletedEvent) ProtoMessage() {}
func (x *ProductDeletedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_product_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProductDeletedEvent.ProtoReflect.Descriptor instead.
func (*ProductDeletedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_product_proto_rawDescGZIP(), []int{2}
}
func (x *ProductDeletedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *ProductDeletedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
type ProductPriceQuoteEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
Type ProductPriceQuoteEvent_Type `protobuf:"varint,2,opt,name=type,proto3,enum=stocklet.events.v1.ProductPriceQuoteEvent_Type" json:"type,omitempty"`
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
// Product ID: Quantity
ProductQuantities map[string]int32 `protobuf:"bytes,4,rep,name=product_quantities,json=productQuantities,proto3" json:"product_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Product ID: Unit Price
ProductPrices map[string]float32 `protobuf:"bytes,5,rep,name=product_prices,json=productPrices,proto3" json:"product_prices,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
TotalPrice float32 `protobuf:"fixed32,6,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`
}
func (x *ProductPriceQuoteEvent) Reset() {
*x = ProductPriceQuoteEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_product_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProductPriceQuoteEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProductPriceQuoteEvent) ProtoMessage() {}
func (x *ProductPriceQuoteEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_product_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProductPriceQuoteEvent.ProtoReflect.Descriptor instead.
func (*ProductPriceQuoteEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_product_proto_rawDescGZIP(), []int{3}
}
func (x *ProductPriceQuoteEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *ProductPriceQuoteEvent) GetType() ProductPriceQuoteEvent_Type {
if x != nil {
return x.Type
}
return ProductPriceQuoteEvent_TYPE_UNSPECIFIED
}
func (x *ProductPriceQuoteEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *ProductPriceQuoteEvent) GetProductQuantities() map[string]int32 {
if x != nil {
return x.ProductQuantities
}
return nil
}
func (x *ProductPriceQuoteEvent) GetProductPrices() map[string]float32 {
if x != nil {
return x.ProductPrices
}
return nil
}
func (x *ProductPriceQuoteEvent) GetTotalPrice() float32 {
if x != nil {
return x.TotalPrice
}
return 0
}
var File_stocklet_events_v1_product_proto protoreflect.FileDescriptor
var file_stocklet_events_v1_product_proto_rawDesc = []byte{
0x0a, 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, 0x12, 0x12, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65,
0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x9c, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x64, 0x75,
0x63, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05,
0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x18, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x50, 0x72, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a,
0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69,
0x63, 0x65, 0x22, 0x50, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76,
0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76,
0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75,
0x63, 0x74, 0x49, 0x64, 0x22, 0xdd, 0x04, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x50, 0x72, 0x69, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12,
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 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, 0x50, 0x72, 0x69, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x65,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x70, 0x0a, 0x12, 0x70,
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 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, 0x50, 0x72, 0x69, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x45, 0x76,
0x65, 0x6e, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x51, 0x75, 0x61, 0x6e, 0x74,
0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x64,
0x75, 0x63, 0x74, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x64, 0x0a,
0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18,
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 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, 0x50, 0x72, 0x69, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x50, 0x72, 0x69,
0x63, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69,
0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50,
0x72, 0x69, 0x63, 0x65, 0x1a, 0x44, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x51,
0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x72,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x46, 0x0a, 0x04,
0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01,
0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x56, 0x41, 0x4c, 0x49, 0x41, 0x42,
0x4c, 0x45, 0x10, 0x02, 0x42, 0x47, 0x5a, 0x45, 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, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_stocklet_events_v1_product_proto_rawDescOnce sync.Once
file_stocklet_events_v1_product_proto_rawDescData = file_stocklet_events_v1_product_proto_rawDesc
)
func file_stocklet_events_v1_product_proto_rawDescGZIP() []byte {
file_stocklet_events_v1_product_proto_rawDescOnce.Do(func() {
file_stocklet_events_v1_product_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_events_v1_product_proto_rawDescData)
})
return file_stocklet_events_v1_product_proto_rawDescData
}
var file_stocklet_events_v1_product_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_stocklet_events_v1_product_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_stocklet_events_v1_product_proto_goTypes = []interface{}{
(ProductPriceQuoteEvent_Type)(0), // 0: stocklet.events.v1.ProductPriceQuoteEvent.Type
(*ProductCreatedEvent)(nil), // 1: stocklet.events.v1.ProductCreatedEvent
(*ProductPriceUpdatedEvent)(nil), // 2: stocklet.events.v1.ProductPriceUpdatedEvent
(*ProductDeletedEvent)(nil), // 3: stocklet.events.v1.ProductDeletedEvent
(*ProductPriceQuoteEvent)(nil), // 4: stocklet.events.v1.ProductPriceQuoteEvent
nil, // 5: stocklet.events.v1.ProductPriceQuoteEvent.ProductQuantitiesEntry
nil, // 6: stocklet.events.v1.ProductPriceQuoteEvent.ProductPricesEntry
}
var file_stocklet_events_v1_product_proto_depIdxs = []int32{
0, // 0: stocklet.events.v1.ProductPriceQuoteEvent.type:type_name -> stocklet.events.v1.ProductPriceQuoteEvent.Type
5, // 1: stocklet.events.v1.ProductPriceQuoteEvent.product_quantities:type_name -> stocklet.events.v1.ProductPriceQuoteEvent.ProductQuantitiesEntry
6, // 2: stocklet.events.v1.ProductPriceQuoteEvent.product_prices:type_name -> stocklet.events.v1.ProductPriceQuoteEvent.ProductPricesEntry
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_stocklet_events_v1_product_proto_init() }
func file_stocklet_events_v1_product_proto_init() {
if File_stocklet_events_v1_product_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_events_v1_product_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProductCreatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_product_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProductPriceUpdatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_product_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProductDeletedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_product_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProductPriceQuoteEvent); 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_events_v1_product_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_stocklet_events_v1_product_proto_goTypes,
DependencyIndexes: file_stocklet_events_v1_product_proto_depIdxs,
EnumInfos: file_stocklet_events_v1_product_proto_enumTypes,
MessageInfos: file_stocklet_events_v1_product_proto_msgTypes,
}.Build()
File_stocklet_events_v1_product_proto = out.File
file_stocklet_events_v1_product_proto_rawDesc = nil
file_stocklet_events_v1_product_proto_goTypes = nil
file_stocklet_events_v1_product_proto_depIdxs = nil
}

View File

@@ -0,0 +1,482 @@
// Copyright (C) 2024 Declan Teevan
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: stocklet/events/v1/shipping.proto
package events_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ShipmentAllocationEvent_Type int32
const (
ShipmentAllocationEvent_TYPE_UNSPECIFIED ShipmentAllocationEvent_Type = 0
ShipmentAllocationEvent_TYPE_FAILED ShipmentAllocationEvent_Type = 1
ShipmentAllocationEvent_TYPE_ALLOCATED ShipmentAllocationEvent_Type = 2
ShipmentAllocationEvent_TYPE_ALLOCATION_RELEASED ShipmentAllocationEvent_Type = 3
)
// Enum value maps for ShipmentAllocationEvent_Type.
var (
ShipmentAllocationEvent_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "TYPE_FAILED",
2: "TYPE_ALLOCATED",
3: "TYPE_ALLOCATION_RELEASED",
}
ShipmentAllocationEvent_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"TYPE_FAILED": 1,
"TYPE_ALLOCATED": 2,
"TYPE_ALLOCATION_RELEASED": 3,
}
)
func (x ShipmentAllocationEvent_Type) Enum() *ShipmentAllocationEvent_Type {
p := new(ShipmentAllocationEvent_Type)
*p = x
return p
}
func (x ShipmentAllocationEvent_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ShipmentAllocationEvent_Type) Descriptor() protoreflect.EnumDescriptor {
return file_stocklet_events_v1_shipping_proto_enumTypes[0].Descriptor()
}
func (ShipmentAllocationEvent_Type) Type() protoreflect.EnumType {
return &file_stocklet_events_v1_shipping_proto_enumTypes[0]
}
func (x ShipmentAllocationEvent_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ShipmentAllocationEvent_Type.Descriptor instead.
func (ShipmentAllocationEvent_Type) EnumDescriptor() ([]byte, []int) {
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{0, 0}
}
type ShipmentAllocationEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
Type ShipmentAllocationEvent_Type `protobuf:"varint,2,opt,name=type,proto3,enum=stocklet.events.v1.ShipmentAllocationEvent_Type" json:"type,omitempty"`
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
OrderMetadata *ShipmentAllocationEvent_OrderMetadata `protobuf:"bytes,4,opt,name=order_metadata,json=orderMetadata,proto3" json:"order_metadata,omitempty"`
ShipmentId string `protobuf:"bytes,5,opt,name=shipment_id,json=shipmentId,proto3" json:"shipment_id,omitempty"` // provided with type enum value 2+
ProductQuantities map[string]int32 `protobuf:"bytes,6,rep,name=product_quantities,json=productQuantities,proto3" json:"product_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *ShipmentAllocationEvent) Reset() {
*x = ShipmentAllocationEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ShipmentAllocationEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ShipmentAllocationEvent) ProtoMessage() {}
func (x *ShipmentAllocationEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ShipmentAllocationEvent.ProtoReflect.Descriptor instead.
func (*ShipmentAllocationEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{0}
}
func (x *ShipmentAllocationEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *ShipmentAllocationEvent) GetType() ShipmentAllocationEvent_Type {
if x != nil {
return x.Type
}
return ShipmentAllocationEvent_TYPE_UNSPECIFIED
}
func (x *ShipmentAllocationEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *ShipmentAllocationEvent) GetOrderMetadata() *ShipmentAllocationEvent_OrderMetadata {
if x != nil {
return x.OrderMetadata
}
return nil
}
func (x *ShipmentAllocationEvent) GetShipmentId() string {
if x != nil {
return x.ShipmentId
}
return ""
}
func (x *ShipmentAllocationEvent) GetProductQuantities() map[string]int32 {
if x != nil {
return x.ProductQuantities
}
return nil
}
type ShipmentDispatchedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ShipmentId string `protobuf:"bytes,2,opt,name=shipment_id,json=shipmentId,proto3" json:"shipment_id,omitempty"`
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
ProductQuantities map[string]int32 `protobuf:"bytes,4,rep,name=product_quantities,json=productQuantities,proto3" json:"product_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *ShipmentDispatchedEvent) Reset() {
*x = ShipmentDispatchedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ShipmentDispatchedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ShipmentDispatchedEvent) ProtoMessage() {}
func (x *ShipmentDispatchedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ShipmentDispatchedEvent.ProtoReflect.Descriptor instead.
func (*ShipmentDispatchedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{1}
}
func (x *ShipmentDispatchedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *ShipmentDispatchedEvent) GetShipmentId() string {
if x != nil {
return x.ShipmentId
}
return ""
}
func (x *ShipmentDispatchedEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *ShipmentDispatchedEvent) GetProductQuantities() map[string]int32 {
if x != nil {
return x.ProductQuantities
}
return nil
}
type ShipmentAllocationEvent_OrderMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
ItemsPrice float32 `protobuf:"fixed32,2,opt,name=items_price,json=itemsPrice,proto3" json:"items_price,omitempty"`
TotalPrice float32 `protobuf:"fixed32,3,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`
}
func (x *ShipmentAllocationEvent_OrderMetadata) Reset() {
*x = ShipmentAllocationEvent_OrderMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ShipmentAllocationEvent_OrderMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ShipmentAllocationEvent_OrderMetadata) ProtoMessage() {}
func (x *ShipmentAllocationEvent_OrderMetadata) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ShipmentAllocationEvent_OrderMetadata.ProtoReflect.Descriptor instead.
func (*ShipmentAllocationEvent_OrderMetadata) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{0, 0}
}
func (x *ShipmentAllocationEvent_OrderMetadata) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *ShipmentAllocationEvent_OrderMetadata) GetItemsPrice() float32 {
if x != nil {
return x.ItemsPrice
}
return 0
}
func (x *ShipmentAllocationEvent_OrderMetadata) GetTotalPrice() float32 {
if x != nil {
return x.TotalPrice
}
return 0
}
var File_stocklet_events_v1_shipping_proto protoreflect.FileDescriptor
var file_stocklet_events_v1_shipping_proto_rawDesc = []byte{
0x0a, 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, 0x12, 0x12, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x22, 0xa7, 0x05, 0x0a, 0x17, 0x53, 0x68, 0x69, 0x70,
0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76,
0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x44, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 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, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52,
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64,
0x12, 0x60, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 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, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x69, 0x70, 0x6d, 0x65, 0x6e,
0x74, 0x49, 0x64, 0x12, 0x71, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x71,
0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x42, 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, 0x2e, 0x50, 0x72, 0x6f,
0x64, 0x75, 0x63, 0x74, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x51, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x72, 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x74, 0x65, 0x6d,
0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x44, 0x0a, 0x16, 0x50, 0x72,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x5f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f,
0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12,
0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x45,
0x44, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x4f,
0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x44, 0x10,
0x03, 0x22, 0xaa, 0x02, 0x0a, 0x17, 0x53, 0x68, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69,
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x69,
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x73, 0x68, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72,
0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72,
0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x71, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x42, 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, 0x44,
0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x50,
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x51, 0x75,
0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x44, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x64,
0x75, 0x63, 0x74, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x47,
0x5a, 0x45, 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, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_stocklet_events_v1_shipping_proto_rawDescOnce sync.Once
file_stocklet_events_v1_shipping_proto_rawDescData = file_stocklet_events_v1_shipping_proto_rawDesc
)
func file_stocklet_events_v1_shipping_proto_rawDescGZIP() []byte {
file_stocklet_events_v1_shipping_proto_rawDescOnce.Do(func() {
file_stocklet_events_v1_shipping_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_events_v1_shipping_proto_rawDescData)
})
return file_stocklet_events_v1_shipping_proto_rawDescData
}
var file_stocklet_events_v1_shipping_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_stocklet_events_v1_shipping_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_stocklet_events_v1_shipping_proto_goTypes = []interface{}{
(ShipmentAllocationEvent_Type)(0), // 0: stocklet.events.v1.ShipmentAllocationEvent.Type
(*ShipmentAllocationEvent)(nil), // 1: stocklet.events.v1.ShipmentAllocationEvent
(*ShipmentDispatchedEvent)(nil), // 2: stocklet.events.v1.ShipmentDispatchedEvent
(*ShipmentAllocationEvent_OrderMetadata)(nil), // 3: stocklet.events.v1.ShipmentAllocationEvent.OrderMetadata
nil, // 4: stocklet.events.v1.ShipmentAllocationEvent.ProductQuantitiesEntry
nil, // 5: stocklet.events.v1.ShipmentDispatchedEvent.ProductQuantitiesEntry
}
var file_stocklet_events_v1_shipping_proto_depIdxs = []int32{
0, // 0: stocklet.events.v1.ShipmentAllocationEvent.type:type_name -> stocklet.events.v1.ShipmentAllocationEvent.Type
3, // 1: stocklet.events.v1.ShipmentAllocationEvent.order_metadata:type_name -> stocklet.events.v1.ShipmentAllocationEvent.OrderMetadata
4, // 2: stocklet.events.v1.ShipmentAllocationEvent.product_quantities:type_name -> stocklet.events.v1.ShipmentAllocationEvent.ProductQuantitiesEntry
5, // 3: stocklet.events.v1.ShipmentDispatchedEvent.product_quantities:type_name -> stocklet.events.v1.ShipmentDispatchedEvent.ProductQuantitiesEntry
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_stocklet_events_v1_shipping_proto_init() }
func file_stocklet_events_v1_shipping_proto_init() {
if File_stocklet_events_v1_shipping_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_events_v1_shipping_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShipmentAllocationEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_shipping_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShipmentDispatchedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_shipping_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShipmentAllocationEvent_OrderMetadata); 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_events_v1_shipping_proto_rawDesc,
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_stocklet_events_v1_shipping_proto_goTypes,
DependencyIndexes: file_stocklet_events_v1_shipping_proto_depIdxs,
EnumInfos: file_stocklet_events_v1_shipping_proto_enumTypes,
MessageInfos: file_stocklet_events_v1_shipping_proto_msgTypes,
}.Build()
File_stocklet_events_v1_shipping_proto = out.File
file_stocklet_events_v1_shipping_proto_rawDesc = nil
file_stocklet_events_v1_shipping_proto_goTypes = nil
file_stocklet_events_v1_shipping_proto_depIdxs = nil
}

View File

@@ -0,0 +1,366 @@
// Copyright (C) 2024 Declan Teevan
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: stocklet/events/v1/user.proto
package events_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UserCreatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
FirstName string `protobuf:"bytes,4,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
LastName string `protobuf:"bytes,5,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
}
func (x *UserCreatedEvent) Reset() {
*x = UserCreatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_user_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserCreatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserCreatedEvent) ProtoMessage() {}
func (x *UserCreatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_user_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserCreatedEvent.ProtoReflect.Descriptor instead.
func (*UserCreatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_user_proto_rawDescGZIP(), []int{0}
}
func (x *UserCreatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *UserCreatedEvent) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *UserCreatedEvent) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *UserCreatedEvent) GetFirstName() string {
if x != nil {
return x.FirstName
}
return ""
}
func (x *UserCreatedEvent) GetLastName() string {
if x != nil {
return x.LastName
}
return ""
}
type UserEmailUpdatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
}
func (x *UserEmailUpdatedEvent) Reset() {
*x = UserEmailUpdatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_user_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserEmailUpdatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserEmailUpdatedEvent) ProtoMessage() {}
func (x *UserEmailUpdatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_user_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserEmailUpdatedEvent.ProtoReflect.Descriptor instead.
func (*UserEmailUpdatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_user_proto_rawDescGZIP(), []int{1}
}
func (x *UserEmailUpdatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *UserEmailUpdatedEvent) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *UserEmailUpdatedEvent) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
type UserDeletedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
}
func (x *UserDeletedEvent) Reset() {
*x = UserDeletedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_user_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserDeletedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserDeletedEvent) ProtoMessage() {}
func (x *UserDeletedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_user_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserDeletedEvent.ProtoReflect.Descriptor instead.
func (*UserDeletedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_user_proto_rawDescGZIP(), []int{2}
}
func (x *UserDeletedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *UserDeletedEvent) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *UserDeletedEvent) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
var File_stocklet_events_v1_user_proto protoreflect.FileDescriptor
var file_stocklet_events_v1_user_proto_rawDesc = []byte{
0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x12, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x2e, 0x76, 0x31, 0x22, 0x99, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61,
0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22,
0x62, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0x22, 0x5d, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61,
0x69, 0x6c, 0x42, 0x47, 0x5a, 0x45, 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, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76,
0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_stocklet_events_v1_user_proto_rawDescOnce sync.Once
file_stocklet_events_v1_user_proto_rawDescData = file_stocklet_events_v1_user_proto_rawDesc
)
func file_stocklet_events_v1_user_proto_rawDescGZIP() []byte {
file_stocklet_events_v1_user_proto_rawDescOnce.Do(func() {
file_stocklet_events_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_events_v1_user_proto_rawDescData)
})
return file_stocklet_events_v1_user_proto_rawDescData
}
var file_stocklet_events_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_stocklet_events_v1_user_proto_goTypes = []interface{}{
(*UserCreatedEvent)(nil), // 0: stocklet.events.v1.UserCreatedEvent
(*UserEmailUpdatedEvent)(nil), // 1: stocklet.events.v1.UserEmailUpdatedEvent
(*UserDeletedEvent)(nil), // 2: stocklet.events.v1.UserDeletedEvent
}
var file_stocklet_events_v1_user_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_stocklet_events_v1_user_proto_init() }
func file_stocklet_events_v1_user_proto_init() {
if File_stocklet_events_v1_user_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_events_v1_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserCreatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserEmailUpdatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserDeletedEvent); 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_events_v1_user_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_stocklet_events_v1_user_proto_goTypes,
DependencyIndexes: file_stocklet_events_v1_user_proto_depIdxs,
MessageInfos: file_stocklet_events_v1_user_proto_msgTypes,
}.Build()
File_stocklet_events_v1_user_proto = out.File
file_stocklet_events_v1_user_proto_rawDesc = nil
file_stocklet_events_v1_user_proto_goTypes = nil
file_stocklet_events_v1_user_proto_depIdxs = nil
}

View File

@@ -0,0 +1,671 @@
// Copyright (C) 2024 Declan Teevan
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: stocklet/events/v1/warehouse.proto
package events_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type StockReservationEvent_Type int32
const (
StockReservationEvent_TYPE_UNSPECIFIED StockReservationEvent_Type = 0
StockReservationEvent_TYPE_INSUFFICIENT_STOCK StockReservationEvent_Type = 1
StockReservationEvent_TYPE_STOCK_RESERVED StockReservationEvent_Type = 2
StockReservationEvent_TYPE_STOCK_RETURNED StockReservationEvent_Type = 3
StockReservationEvent_TYPE_STOCK_CONSUMED StockReservationEvent_Type = 4
)
// Enum value maps for StockReservationEvent_Type.
var (
StockReservationEvent_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "TYPE_INSUFFICIENT_STOCK",
2: "TYPE_STOCK_RESERVED",
3: "TYPE_STOCK_RETURNED",
4: "TYPE_STOCK_CONSUMED",
}
StockReservationEvent_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"TYPE_INSUFFICIENT_STOCK": 1,
"TYPE_STOCK_RESERVED": 2,
"TYPE_STOCK_RETURNED": 3,
"TYPE_STOCK_CONSUMED": 4,
}
)
func (x StockReservationEvent_Type) Enum() *StockReservationEvent_Type {
p := new(StockReservationEvent_Type)
*p = x
return p
}
func (x StockReservationEvent_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StockReservationEvent_Type) Descriptor() protoreflect.EnumDescriptor {
return file_stocklet_events_v1_warehouse_proto_enumTypes[0].Descriptor()
}
func (StockReservationEvent_Type) Type() protoreflect.EnumType {
return &file_stocklet_events_v1_warehouse_proto_enumTypes[0]
}
func (x StockReservationEvent_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StockReservationEvent_Type.Descriptor instead.
func (StockReservationEvent_Type) EnumDescriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{3, 0}
}
type StockCreatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
}
func (x *StockCreatedEvent) Reset() {
*x = StockCreatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockCreatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockCreatedEvent) ProtoMessage() {}
func (x *StockCreatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockCreatedEvent.ProtoReflect.Descriptor instead.
func (*StockCreatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{0}
}
func (x *StockCreatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockCreatedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *StockCreatedEvent) GetQuantity() int32 {
if x != nil {
return x.Quantity
}
return 0
}
type StockAddedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Amount int32 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
// If the stock is returned as a result of a stock reservation outcome,
// then the reservation id will be included for reference.
ReservationId *string `protobuf:"bytes,4,opt,name=reservation_id,json=reservationId,proto3,oneof" json:"reservation_id,omitempty"`
}
func (x *StockAddedEvent) Reset() {
*x = StockAddedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockAddedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockAddedEvent) ProtoMessage() {}
func (x *StockAddedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockAddedEvent.ProtoReflect.Descriptor instead.
func (*StockAddedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{1}
}
func (x *StockAddedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockAddedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *StockAddedEvent) GetAmount() int32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *StockAddedEvent) GetReservationId() string {
if x != nil && x.ReservationId != nil {
return *x.ReservationId
}
return ""
}
type StockRemovedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Amount int32 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
// If the stock is removed as a result of a stock reservation being closed,
// then the reservation id will be included for reference.
ReservationId *string `protobuf:"bytes,4,opt,name=reservation_id,json=reservationId,proto3,oneof" json:"reservation_id,omitempty"`
}
func (x *StockRemovedEvent) Reset() {
*x = StockRemovedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockRemovedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockRemovedEvent) ProtoMessage() {}
func (x *StockRemovedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockRemovedEvent.ProtoReflect.Descriptor instead.
func (*StockRemovedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{2}
}
func (x *StockRemovedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockRemovedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *StockRemovedEvent) GetAmount() int32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *StockRemovedEvent) GetReservationId() string {
if x != nil && x.ReservationId != nil {
return *x.ReservationId
}
return ""
}
type StockReservationEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
Type StockReservationEvent_Type `protobuf:"varint,2,opt,name=type,proto3,enum=stocklet.events.v1.StockReservationEvent_Type" json:"type,omitempty"`
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
OrderMetadata *StockReservationEvent_OrderMetadata `protobuf:"bytes,4,opt,name=order_metadata,json=orderMetadata,proto3" json:"order_metadata,omitempty"`
ReservationId string `protobuf:"bytes,5,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"` // provided with type enum value 2+
ReservationStock map[string]int32 `protobuf:"bytes,6,rep,name=reservation_stock,json=reservationStock,proto3" json:"reservation_stock,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // Product ID: Quantity (provided with type enum value 2+)
InsufficientStock []string `protobuf:"bytes,7,rep,name=insufficient_stock,json=insufficientStock,proto3" json:"insufficient_stock,omitempty"` // Product IDs (only provided with TYPE_INSUFFICIENT_STOCK)
}
func (x *StockReservationEvent) Reset() {
*x = StockReservationEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockReservationEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockReservationEvent) ProtoMessage() {}
func (x *StockReservationEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockReservationEvent.ProtoReflect.Descriptor instead.
func (*StockReservationEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{3}
}
func (x *StockReservationEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockReservationEvent) GetType() StockReservationEvent_Type {
if x != nil {
return x.Type
}
return StockReservationEvent_TYPE_UNSPECIFIED
}
func (x *StockReservationEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *StockReservationEvent) GetOrderMetadata() *StockReservationEvent_OrderMetadata {
if x != nil {
return x.OrderMetadata
}
return nil
}
func (x *StockReservationEvent) GetReservationId() string {
if x != nil {
return x.ReservationId
}
return ""
}
func (x *StockReservationEvent) GetReservationStock() map[string]int32 {
if x != nil {
return x.ReservationStock
}
return nil
}
func (x *StockReservationEvent) GetInsufficientStock() []string {
if x != nil {
return x.InsufficientStock
}
return nil
}
type StockReservationEvent_OrderMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
ItemsPrice float32 `protobuf:"fixed32,2,opt,name=items_price,json=itemsPrice,proto3" json:"items_price,omitempty"`
TotalPrice float32 `protobuf:"fixed32,3,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`
}
func (x *StockReservationEvent_OrderMetadata) Reset() {
*x = StockReservationEvent_OrderMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockReservationEvent_OrderMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockReservationEvent_OrderMetadata) ProtoMessage() {}
func (x *StockReservationEvent_OrderMetadata) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockReservationEvent_OrderMetadata.ProtoReflect.Descriptor instead.
func (*StockReservationEvent_OrderMetadata) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{3, 0}
}
func (x *StockReservationEvent_OrderMetadata) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *StockReservationEvent_OrderMetadata) GetItemsPrice() float32 {
if x != nil {
return x.ItemsPrice
}
return 0
}
func (x *StockReservationEvent_OrderMetadata) GetTotalPrice() float32 {
if x != nil {
return x.TotalPrice
}
return 0
}
var File_stocklet_events_v1_warehouse_proto protoreflect.FileDescriptor
var file_stocklet_events_v1_warehouse_proto_rawDesc = []byte{
0x0a, 0x22, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x6a, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x63,
0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f,
0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x22, 0xa3, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x41, 0x64,
0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x72,
0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x65,
0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x11, 0x53,
0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a,
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x72,
0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42,
0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x69, 0x64, 0x22, 0xf6, 0x05, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x65,
0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08,
0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65,
0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x63,
0x6b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x5e, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72,
0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x37, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72,
0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x6c,
0x0a, 0x11, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74,
0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x73, 0x74, 0x6f, 0x63,
0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53,
0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x74, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65, 0x73, 0x65,
0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x2d, 0x0a, 0x12,
0x69, 0x6e, 0x73, 0x75, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x6f,
0x63, 0x6b, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x75, 0x66, 0x66,
0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x1a, 0x72, 0x0a, 0x0d, 0x4f,
0x72, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a,
0x0b, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x02, 0x52, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1f,
0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a,
0x43, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55,
0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b, 0x10, 0x01,
0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b, 0x5f, 0x52,
0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b, 0x5f, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x45, 0x44,
0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b,
0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x44, 0x10, 0x04, 0x42, 0x47, 0x5a, 0x45, 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, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_stocklet_events_v1_warehouse_proto_rawDescOnce sync.Once
file_stocklet_events_v1_warehouse_proto_rawDescData = file_stocklet_events_v1_warehouse_proto_rawDesc
)
func file_stocklet_events_v1_warehouse_proto_rawDescGZIP() []byte {
file_stocklet_events_v1_warehouse_proto_rawDescOnce.Do(func() {
file_stocklet_events_v1_warehouse_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_events_v1_warehouse_proto_rawDescData)
})
return file_stocklet_events_v1_warehouse_proto_rawDescData
}
var file_stocklet_events_v1_warehouse_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_stocklet_events_v1_warehouse_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_stocklet_events_v1_warehouse_proto_goTypes = []interface{}{
(StockReservationEvent_Type)(0), // 0: stocklet.events.v1.StockReservationEvent.Type
(*StockCreatedEvent)(nil), // 1: stocklet.events.v1.StockCreatedEvent
(*StockAddedEvent)(nil), // 2: stocklet.events.v1.StockAddedEvent
(*StockRemovedEvent)(nil), // 3: stocklet.events.v1.StockRemovedEvent
(*StockReservationEvent)(nil), // 4: stocklet.events.v1.StockReservationEvent
(*StockReservationEvent_OrderMetadata)(nil), // 5: stocklet.events.v1.StockReservationEvent.OrderMetadata
nil, // 6: stocklet.events.v1.StockReservationEvent.ReservationStockEntry
}
var file_stocklet_events_v1_warehouse_proto_depIdxs = []int32{
0, // 0: stocklet.events.v1.StockReservationEvent.type:type_name -> stocklet.events.v1.StockReservationEvent.Type
5, // 1: stocklet.events.v1.StockReservationEvent.order_metadata:type_name -> stocklet.events.v1.StockReservationEvent.OrderMetadata
6, // 2: stocklet.events.v1.StockReservationEvent.reservation_stock:type_name -> stocklet.events.v1.StockReservationEvent.ReservationStockEntry
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_stocklet_events_v1_warehouse_proto_init() }
func file_stocklet_events_v1_warehouse_proto_init() {
if File_stocklet_events_v1_warehouse_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_events_v1_warehouse_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockCreatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockAddedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockRemovedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockReservationEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockReservationEvent_OrderMetadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[1].OneofWrappers = []interface{}{}
file_stocklet_events_v1_warehouse_proto_msgTypes[2].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stocklet_events_v1_warehouse_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_stocklet_events_v1_warehouse_proto_goTypes,
DependencyIndexes: file_stocklet_events_v1_warehouse_proto_depIdxs,
EnumInfos: file_stocklet_events_v1_warehouse_proto_enumTypes,
MessageInfos: file_stocklet_events_v1_warehouse_proto_msgTypes,
}.Build()
File_stocklet_events_v1_warehouse_proto = out.File
file_stocklet_events_v1_warehouse_proto_rawDesc = nil
file_stocklet_events_v1_warehouse_proto_goTypes = nil
file_stocklet_events_v1_warehouse_proto_depIdxs = nil
}