add profile actors
Build and Publish / BuildAndDeployArm64 (push) Failing after 5s
Build and Publish / BuildAndDeployAmd64 (push) Failing after 3s

This commit is contained in:
2026-06-25 17:19:59 +02:00
parent faa5330b81
commit 86797e520e
18 changed files with 3436 additions and 10 deletions
+90
View File
@@ -0,0 +1,90 @@
syntax = "proto3";
package profile_messages;
option go_package = "git.k6n.net/mats/go-cart-actor/proto/profile;profile_messages";
// Profile mutations — each message is an immutable event in a user's profile
// event log (actor.DiskStorage). The current ProfileGrain is a projection
// rebuilt by replaying them in order.
// Address represents a stored address in the user's profile.
message Address {
uint32 id = 1;
string label = 2; // e.g. "Home", "Work"
string fullName = 3;
string addressLine1 = 4;
optional string addressLine2 = 5;
string city = 6;
string state = 7;
string zip = 8;
string country = 9;
optional string phone = 10;
bool isDefaultShipping = 11;
bool isDefaultBilling = 12;
}
// SetProfile sets the user's core profile information.
message SetProfile {
optional string name = 1;
optional string email = 2;
optional string phone = 3;
optional string language = 4;
optional string currency = 5;
optional string avatarUrl = 6;
}
// AddAddress adds a new address to the user's address book.
message AddAddress {
Address address = 1;
}
// UpdateAddress updates an existing address (matched by id).
message UpdateAddress {
uint32 id = 1;
optional string label = 2;
optional string fullName = 3;
optional string addressLine1 = 4;
optional string addressLine2 = 5;
optional string city = 6;
optional string state = 7;
optional string zip = 8;
optional string country = 9;
optional string phone = 10;
optional bool isDefaultShipping = 11;
optional bool isDefaultBilling = 12;
}
// RemoveAddress removes an address from the address book.
message RemoveAddress {
uint32 id = 1;
}
// LinkCart links a cart grain to this user profile.
message LinkCart {
uint64 cartId = 1;
string label = 2; // optional label, e.g. "current cart"
}
// LinkCheckout links a checkout grain to this user profile.
message LinkCheckout {
uint64 checkoutId = 1;
uint64 cartId = 2; // the cart this checkout belongs to
}
// LinkOrder links an order to this user profile.
message LinkOrder {
string orderReference = 1; // order reference / id
uint64 cartId = 2; // originating cart
string status = 3; // order status snapshot
}
message Mutation {
oneof type {
SetProfile set_profile = 1;
AddAddress add_address = 2;
UpdateAddress update_address = 3;
RemoveAddress remove_address = 4;
LinkCart link_cart = 5;
LinkCheckout link_checkout = 6;
LinkOrder link_order = 7;
}
}
File diff suppressed because it is too large Load Diff