Mats Törnberg 92ebb49b09
Some checks failed
Build and Publish / BuildAndDeploy (push) Successful in 3m15s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled
update
2025-09-28 16:04:45 +02:00
2024-11-21 20:23:56 +01:00
2024-11-16 10:14:38 +01:00
2024-11-13 09:59:29 +01:00
2025-09-28 16:04:45 +02:00
2025-09-28 10:30:59 +02:00
2025-04-18 19:04:39 +02:00
2024-11-14 22:53:32 +01:00
2025-09-28 09:41:07 +02:00
2024-11-14 19:33:04 +01:00
2024-11-14 19:02:42 +01:00
2024-11-13 08:58:40 +01:00
2025-04-18 20:41:25 +02:00
2025-04-18 20:41:25 +02:00
2024-11-21 18:13:29 +01:00
2024-11-16 10:14:38 +01:00
2025-09-28 15:56:40 +02:00
2025-05-13 19:46:06 +02:00
2025-09-28 15:56:40 +02:00
2025-09-28 15:56:40 +02:00
2025-04-18 17:46:29 +02:00
2024-11-14 22:53:32 +01:00
2025-05-18 11:00:08 +02:00
2025-09-28 16:04:45 +02:00
2025-09-28 09:41:07 +02:00
2024-11-13 23:12:09 +01:00
2024-11-21 21:23:38 +01:00
2024-11-21 21:23:38 +01:00
2024-11-21 21:23:38 +01:00
2024-11-21 21:23:38 +01:00
2024-11-14 20:35:04 +01:00
2025-03-18 19:40:35 +01:00
2025-03-18 19:20:53 +01:00
2025-03-18 19:40:35 +01:00

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:

winget install protobuf

On macOS:

brew install protobuf

On Linux:

# Ubuntu/Debian
sudo apt install protobuf-compiler

# Or download from: https://github.com/protocolbuffers/protobuf/releases

Installing Go protobuf plugin

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:

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

go build .

Running tests

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)
Description
No description provided
Readme 91 MiB
Languages
Go 95.9%
JavaScript 1.8%
Makefile 1.4%
Dockerfile 0.9%