add country
Some checks failed
Build and Publish / BuildAndDeploy (push) Successful in 4m29s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
2025-09-28 09:41:07 +02:00
parent 5c7b8d87e8
commit 8c8ff75b2d
6 changed files with 236 additions and 141 deletions

View File

@@ -1 +1,80 @@
protoc --proto_path=proto --go_out=out --go_opt=paths=source_relative proto/messages.proto # Go Cart Actor
A distributed cart management system using the actor model pattern.
## Prerequisites
- Go 1.24.2+
- Protocol Buffers compiler (`protoc`)
- protoc-gen-go plugin
### Installing Protocol Buffers
On Windows:
```powershell
winget install protobuf
```
On macOS:
```bash
brew install protobuf
```
On Linux:
```bash
# Ubuntu/Debian
sudo apt install protobuf-compiler
# Or download from: https://github.com/protocolbuffers/protobuf/releases
```
### Installing Go protobuf plugin
```bash
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
```
## Working with Protocol Buffers
### Generating Go code from proto files
After modifying `proto/messages.proto`, regenerate the Go code:
```bash
cd proto
protoc --go_out=. --go_opt=paths=source_relative messages.proto
```
### Protocol Buffer Messages
The `proto/messages.proto` file defines the following message types:
- `AddRequest` - Add items to cart (includes quantity, sku, country, optional storeId)
- `SetCartRequest` - Set entire cart contents
- `AddItem` - Complete item information for cart
- `RemoveItem` - Remove item from cart
- `ChangeQuantity` - Update item quantity
- `SetDelivery` - Configure delivery options
- `SetPickupPoint` - Set pickup location
- `PickupPoint` - Pickup point details
- `RemoveDelivery` - Remove delivery option
- `CreateCheckoutOrder` - Initiate checkout
- `OrderCreated` - Order creation response
### Building the project
```bash
go build .
```
### Running tests
```bash
go test ./...
```
## Important Notes
- Always regenerate protobuf Go code after modifying `.proto` files
- The generated `messages.pb.go` file should not be edited manually
- Make sure your PATH includes the protoc-gen-go binary location (usually `$GOPATH/bin`)

View File

@@ -127,8 +127,8 @@ func getInt(data interface{}) (int, error) {
} }
} }
func getItemData(sku string, qty int) (*messages.AddItem, error) { func getItemData(sku string, qty int, country string) (*messages.AddItem, error) {
item, err := FetchItem(sku) item, err := FetchItem(sku, country)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -162,11 +162,6 @@ func getItemData(sku string, qty int) (*messages.AddItem, error) {
category4, _ := item.Fields[13].(string) category4, _ := item.Fields[13].(string)
category5, _ := item.Fields[14].(string) category5, _ := item.Fields[14].(string)
// is own
if sellerName == "Elgiganten" {
sellerName = ""
}
return &messages.AddItem{ return &messages.AddItem{
ItemId: int64(item.Id), ItemId: int64(item.Id),
Quantity: int32(qty), Quantity: int32(qty),
@@ -187,12 +182,13 @@ func getItemData(sku string, qty int) (*messages.AddItem, error) {
SellerName: sellerName, SellerName: sellerName,
ArticleType: articleType, ArticleType: articleType,
Disclaimer: item.Disclaimer, Disclaimer: item.Disclaimer,
Country: country,
Outlet: outlet, Outlet: outlet,
}, nil }, nil
} }
func (c *CartGrain) AddItem(sku string, qty int) (*FrameWithPayload, error) { func (c *CartGrain) AddItem(sku string, qty int, country string) (*FrameWithPayload, error) {
cartItem, err := getItemData(sku, qty) cartItem, err := getItemData(sku, qty, country)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -286,7 +282,7 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
c.Items = make([]*CartItem, 0, len(msg.Items)) c.Items = make([]*CartItem, 0, len(msg.Items))
c.mu.Unlock() c.mu.Unlock()
for _, item := range msg.Items { for _, item := range msg.Items {
c.AddItem(item.Sku, int(item.Quantity)) c.AddItem(item.Sku, int(item.Quantity), item.Country)
} }
} }
@@ -301,7 +297,7 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
existingItem.Quantity += int(msg.Quantity) existingItem.Quantity += int(msg.Quantity)
c.UpdateTotals() c.UpdateTotals()
} else { } else {
return c.AddItem(msg.Sku, int(msg.Quantity)) // extent AddRequest to include quantity return c.AddItem(msg.Sku, int(msg.Quantity), msg.Country)
} }
} }

View File

@@ -15,7 +15,7 @@ metadata:
arch: amd64 arch: amd64
name: cart-actor-x86 name: cart-actor-x86
spec: spec:
replicas: 3 replicas: 0
selector: selector:
matchLabels: matchLabels:
app: cart-actor app: cart-actor
@@ -102,6 +102,8 @@ spec:
fieldPath: status.podIP fieldPath: status.podIP
- name: AMQP_URL - name: AMQP_URL
value: "amqp://admin:12bananer@rabbitmq.dev:5672/" value: "amqp://admin:12bananer@rabbitmq.dev:5672/"
# - name: BASE_URL
# value: "https://s10n-no.tornberg.me"
- name: POD_NAME - name: POD_NAME
valueFrom: valueFrom:
fieldRef: fieldRef:
@@ -206,6 +208,8 @@ spec:
fieldPath: status.podIP fieldPath: status.podIP
- name: AMQP_URL - name: AMQP_URL
value: "amqp://admin:12bananer@rabbitmq.dev:5672/" value: "amqp://admin:12bananer@rabbitmq.dev:5672/"
# - name: BASE_URL
# value: "https://s10n-no.tornberg.me"
- name: POD_NAME - name: POD_NAME
valueFrom: valueFrom:
fieldRef: fieldRef:

View File

@@ -4,23 +4,23 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"net/http" "net/http"
"os"
"github.com/matst80/slask-finder/pkg/index" "github.com/matst80/slask-finder/pkg/index"
) )
/** end */ // TODO make this configurable
var baseUrl string func getBaseUrl(country string) string {
// if country == "se" {
func init() { // return "http://s10n-se:8080"
baseUrl = "https://slask-finder.tornberg.me" // }
envUrl := os.Getenv("BASE_URL") if country == "no" {
if envUrl != "" { return "http://s10n-no:8080"
baseUrl = envUrl
} }
return "https://slask-finder.tornberg.me"
} }
func FetchItem(sku string) (*index.DataItem, error) { func FetchItem(sku string, country string) (*index.DataItem, error) {
baseUrl := getBaseUrl(country)
res, err := http.Get(fmt.Sprintf("%s/api/by-sku/%s", baseUrl, sku)) res, err := http.Get(fmt.Sprintf("%s/api/by-sku/%s", baseUrl, sku))
if err != nil { if err != nil {
return nil, err return nil, err

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.5 // protoc-gen-go v1.36.9
// protoc v5.29.3 // protoc v6.32.1
// source: messages.proto // source: messages.proto
package messages package messages
@@ -25,6 +25,8 @@ type AddRequest struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Quantity int32 `protobuf:"varint,1,opt,name=quantity,proto3" json:"quantity,omitempty"` Quantity int32 `protobuf:"varint,1,opt,name=quantity,proto3" json:"quantity,omitempty"`
Sku string `protobuf:"bytes,2,opt,name=sku,proto3" json:"sku,omitempty"` Sku string `protobuf:"bytes,2,opt,name=sku,proto3" json:"sku,omitempty"`
Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"`
StoreId *string `protobuf:"bytes,4,opt,name=storeId,proto3,oneof" json:"storeId,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -73,6 +75,20 @@ func (x *AddRequest) GetSku() string {
return "" return ""
} }
func (x *AddRequest) GetCountry() string {
if x != nil {
return x.Country
}
return ""
}
func (x *AddRequest) GetStoreId() string {
if x != nil && x.StoreId != nil {
return *x.StoreId
}
return ""
}
type SetCartRequest struct { type SetCartRequest struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Items []*AddRequest `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` Items []*AddRequest `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
@@ -138,6 +154,7 @@ type AddItem struct {
ArticleType string `protobuf:"bytes,11,opt,name=articleType,proto3" json:"articleType,omitempty"` ArticleType string `protobuf:"bytes,11,opt,name=articleType,proto3" json:"articleType,omitempty"`
SellerId string `protobuf:"bytes,19,opt,name=sellerId,proto3" json:"sellerId,omitempty"` SellerId string `protobuf:"bytes,19,opt,name=sellerId,proto3" json:"sellerId,omitempty"`
SellerName string `protobuf:"bytes,20,opt,name=sellerName,proto3" json:"sellerName,omitempty"` SellerName string `protobuf:"bytes,20,opt,name=sellerName,proto3" json:"sellerName,omitempty"`
Country string `protobuf:"bytes,21,opt,name=country,proto3" json:"country,omitempty"`
Outlet *string `protobuf:"bytes,12,opt,name=outlet,proto3,oneof" json:"outlet,omitempty"` Outlet *string `protobuf:"bytes,12,opt,name=outlet,proto3,oneof" json:"outlet,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -306,6 +323,13 @@ func (x *AddItem) GetSellerName() string {
return "" return ""
} }
func (x *AddItem) GetCountry() string {
if x != nil {
return x.Country
}
return ""
}
func (x *AddItem) GetOutlet() string { func (x *AddItem) GetOutlet() string {
if x != nil && x.Outlet != nil { if x != nil && x.Outlet != nil {
return *x.Outlet return *x.Outlet
@@ -851,122 +875,110 @@ func (x *OrderCreated) GetStatus() string {
var File_messages_proto protoreflect.FileDescriptor var File_messages_proto protoreflect.FileDescriptor
var file_messages_proto_rawDesc = string([]byte{ const file_messages_proto_rawDesc = "" +
0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, "\n" +
0x12, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3a, 0x0a, 0x0a, 0x41, 0x64, "\x0emessages.proto\x12\bmessages\"\x7f\n" +
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, "\n" +
0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, "AddRequest\x12\x1a\n" +
0x74, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x6b, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, "\bquantity\x18\x01 \x01(\x05R\bquantity\x12\x10\n" +
0x09, 0x52, 0x03, 0x73, 0x6b, 0x75, 0x22, 0x3c, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x43, 0x61, 0x72, "\x03sku\x18\x02 \x01(\tR\x03sku\x12\x18\n" +
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, "\acountry\x18\x03 \x01(\tR\acountry\x12\x1d\n" +
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, "\astoreId\x18\x04 \x01(\tH\x00R\astoreId\x88\x01\x01B\n" +
0x65, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x05, 0x69, "\n" +
0x74, 0x65, 0x6d, 0x73, 0x22, 0xa4, 0x04, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, "\b_storeId\"<\n" +
0x12, 0x17, 0x0a, 0x07, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, "\x0eSetCartRequest\x12*\n" +
0x03, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, "\x05items\x18\x01 \x03(\v2\x14.messages.AddRequestR\x05items\"\xbe\x04\n" +
0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x71, 0x75, 0x61, "\aAddItem\x12\x17\n" +
0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, "\aitem_id\x18\x01 \x01(\x03R\x06itemId\x12\x1a\n" +
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, "\bquantity\x18\x02 \x01(\x05R\bquantity\x12\x14\n" +
0x72, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, "\x05price\x18\x03 \x01(\x03R\x05price\x12\x1a\n" +
0x72, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x6b, 0x75, 0x18, 0x04, "\borgPrice\x18\t \x01(\x03R\borgPrice\x12\x10\n" +
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x6b, 0x75, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, "\x03sku\x18\x04 \x01(\tR\x03sku\x12\x12\n" +
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, "\x04name\x18\x05 \x01(\tR\x04name\x12\x14\n" +
0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, "\x05image\x18\x06 \x01(\tR\x05image\x12\x14\n" +
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, "\x05stock\x18\a \x01(\x05R\x05stock\x12\x10\n" +
0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x78, "\x03tax\x18\b \x01(\x05R\x03tax\x12\x14\n" +
0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x62, "\x05brand\x18\r \x01(\tR\x05brand\x12\x1a\n" +
0x72, 0x61, 0x6e, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x72, 0x61, 0x6e, "\bcategory\x18\x0e \x01(\tR\bcategory\x12\x1c\n" +
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x0e, 0x20, "\tcategory2\x18\x0f \x01(\tR\tcategory2\x12\x1c\n" +
0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, "\tcategory3\x18\x10 \x01(\tR\tcategory3\x12\x1c\n" +
0x09, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x32, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, "\tcategory4\x18\x11 \x01(\tR\tcategory4\x12\x1c\n" +
0x52, 0x09, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x32, 0x12, 0x1c, 0x0a, 0x09, 0x63, "\tcategory5\x18\x12 \x01(\tR\tcategory5\x12\x1e\n" +
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x33, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, "\n" +
0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x33, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x74, "disclaimer\x18\n" +
0x65, 0x67, 0x6f, 0x72, 0x79, 0x34, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, " \x01(\tR\n" +
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x34, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x74, 0x65, 0x67, "disclaimer\x12 \n" +
0x6f, 0x72, 0x79, 0x35, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x65, "\varticleType\x18\v \x01(\tR\varticleType\x12\x1a\n" +
0x67, 0x6f, 0x72, 0x79, 0x35, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, "\bsellerId\x18\x13 \x01(\tR\bsellerId\x12\x1e\n" +
0x6d, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x63, 0x6c, "\n" +
0x61, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, "sellerName\x18\x14 \x01(\tR\n" +
0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, "sellerName\x12\x18\n" +
0x63, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x6c, 0x65, "\acountry\x18\x15 \x01(\tR\acountry\x12\x1b\n" +
0x72, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x6c, 0x65, "\x06outlet\x18\f \x01(\tH\x00R\x06outlet\x88\x01\x01B\t\n" +
0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x4e, 0x61, 0x6d, "\a_outlet\"\x1c\n" +
0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x4e, "\n" +
0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x6c, 0x65, 0x74, 0x18, 0x0c, 0x20, "RemoveItem\x12\x0e\n" +
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x6c, 0x65, 0x74, 0x88, 0x01, 0x01, "\x02Id\x18\x01 \x01(\x03R\x02Id\"<\n" +
0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x75, 0x74, 0x6c, 0x65, 0x74, 0x22, 0x1c, 0x0a, 0x0a, 0x52, "\x0eChangeQuantity\x12\x0e\n" +
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x43, 0x68, 0x61, "\bquantity\x18\x02 \x01(\x05R\bquantity\"\x86\x02\n" +
0x6e, 0x67, 0x65, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, "\vSetDelivery\x12\x1a\n" +
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, "\bprovider\x18\x01 \x01(\tR\bprovider\x12\x14\n" +
0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x71, "\x05items\x18\x02 \x03(\x03R\x05items\x12<\n" +
0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x86, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x44, "\vpickupPoint\x18\x03 \x01(\v2\x15.messages.PickupPointH\x00R\vpickupPoint\x88\x01\x01\x12\x18\n" +
0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, "\acountry\x18\x04 \x01(\tR\acountry\x12\x10\n" +
0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, "\x03zip\x18\x05 \x01(\tR\x03zip\x12\x1d\n" +
0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, "\aaddress\x18\x06 \x01(\tH\x01R\aaddress\x88\x01\x01\x12\x17\n" +
0x28, 0x03, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x69, 0x63, "\x04city\x18\a \x01(\tH\x02R\x04city\x88\x01\x01B\x0e\n" +
0x6b, 0x75, 0x70, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, "\f_pickupPointB\n" +
0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x63, 0x6b, 0x75, 0x70, "\n" +
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x50, "\b_addressB\a\n" +
0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, "\x05_city\"\xf9\x01\n" +
0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, "\x0eSetPickupPoint\x12\x1e\n" +
0x79, 0x12, 0x10, 0x0a, 0x03, 0x7a, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, "\n" +
0x7a, 0x69, 0x70, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, "deliveryId\x18\x01 \x01(\x03R\n" +
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, "deliveryId\x12\x0e\n" +
0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, "\x02id\x18\x02 \x01(\tR\x02id\x12\x17\n" +
0x48, 0x02, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, "\x04name\x18\x03 \x01(\tH\x00R\x04name\x88\x01\x01\x12\x1d\n" +
0x70, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x5f, "\aaddress\x18\x04 \x01(\tH\x01R\aaddress\x88\x01\x01\x12\x17\n" +
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x69, 0x74, 0x79, "\x04city\x18\x05 \x01(\tH\x02R\x04city\x88\x01\x01\x12\x15\n" +
0x22, 0xf9, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6f, "\x03zip\x18\x06 \x01(\tH\x03R\x03zip\x88\x01\x01\x12\x1d\n" +
0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x49, "\acountry\x18\a \x01(\tH\x04R\acountry\x88\x01\x01B\a\n" +
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, "\x05_nameB\n" +
0x79, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, "\n" +
0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, "\b_addressB\a\n" +
0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, "\x05_cityB\x06\n" +
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, "\x04_zipB\n" +
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, "\n" +
0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x63, 0x69, 0x74, "\b_country\"\xd6\x01\n" +
0x79, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x7a, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, "\vPickupPoint\x12\x0e\n" +
0x09, 0x48, 0x03, 0x52, 0x03, 0x7a, 0x69, 0x70, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, "\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n" +
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, "\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x12\x1d\n" +
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, "\aaddress\x18\x03 \x01(\tH\x01R\aaddress\x88\x01\x01\x12\x17\n" +
0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, "\x04city\x18\x04 \x01(\tH\x02R\x04city\x88\x01\x01\x12\x15\n" +
0x07, 0x0a, 0x05, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, 0x69, 0x70, "\x03zip\x18\x05 \x01(\tH\x03R\x03zip\x88\x01\x01\x12\x1d\n" +
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xd6, 0x01, 0x0a, "\acountry\x18\x06 \x01(\tH\x04R\acountry\x88\x01\x01B\a\n" +
0x0b, 0x50, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, "\x05_nameB\n" +
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, "\n" +
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, "\b_addressB\a\n" +
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, "\x05_cityB\x06\n" +
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, "\x04_zipB\n" +
0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, "\n" +
0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, "\b_country\" \n" +
0x03, 0x7a, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x03, 0x7a, 0x69, "\x0eRemoveDelivery\x12\x0e\n" +
0x70, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, "\x02id\x18\x01 \x01(\x03R\x02id\"\x9f\x01\n" +
0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, "\x13CreateCheckoutOrder\x12\x14\n" +
0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, "\x05terms\x18\x01 \x01(\tR\x05terms\x12\x1a\n" +
0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x69, 0x74, "\bcheckout\x18\x02 \x01(\tR\bcheckout\x12\"\n" +
0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, 0x69, 0x70, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, "\fconfirmation\x18\x03 \x01(\tR\fconfirmation\x12\x12\n" +
0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x20, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, "\x04push\x18\x04 \x01(\tR\x04push\x12\x1e\n" +
0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, "\n" +
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, "validation\x18\x05 \x01(\tR\n" +
0x74, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, "validation\"@\n" +
0x14, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, "\fOrderCreated\x12\x18\n" +
0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, "\aorderId\x18\x01 \x01(\tR\aorderId\x12\x16\n" +
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, "\x06status\x18\x02 \x01(\tR\x06statusB\fZ\n" +
0x74, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, ".;messagesb\x06proto3"
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x75, 0x73, 0x68, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x40, 0x0a, 0x0c, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0c, 0x5a, 0x0a, 0x2e,
0x3b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
})
var ( var (
file_messages_proto_rawDescOnce sync.Once file_messages_proto_rawDescOnce sync.Once
@@ -1009,6 +1021,7 @@ func file_messages_proto_init() {
if File_messages_proto != nil { if File_messages_proto != nil {
return return
} }
file_messages_proto_msgTypes[0].OneofWrappers = []any{}
file_messages_proto_msgTypes[2].OneofWrappers = []any{} file_messages_proto_msgTypes[2].OneofWrappers = []any{}
file_messages_proto_msgTypes[5].OneofWrappers = []any{} file_messages_proto_msgTypes[5].OneofWrappers = []any{}
file_messages_proto_msgTypes[6].OneofWrappers = []any{} file_messages_proto_msgTypes[6].OneofWrappers = []any{}

View File

@@ -5,6 +5,8 @@ option go_package = ".;messages";
message AddRequest { message AddRequest {
int32 quantity = 1; int32 quantity = 1;
string sku = 2; string sku = 2;
string country = 3;
optional string storeId = 4;
} }
message SetCartRequest { message SetCartRequest {
@@ -31,6 +33,7 @@ message AddItem {
string articleType = 11; string articleType = 11;
string sellerId = 19; string sellerId = 19;
string sellerName = 20; string sellerName = 20;
string country = 21;
optional string outlet = 12; optional string outlet = 12;
} }