more changes

This commit is contained in:
matst80
2025-10-10 09:34:40 +00:00
parent b97eb8f285
commit e7c67fbb9b
25 changed files with 1888 additions and 3689 deletions

View File

@@ -30,7 +30,7 @@ const (
// CartActor exposes mutation and state retrieval for remote grains.
type CartActorClient interface {
// Mutate applies a single mutation to a cart, creating the cart lazily if needed.
Mutate(ctx context.Context, in *MutationRequest, opts ...grpc.CallOption) (*MutationReply, error)
Mutate(ctx context.Context, in *MutationEnvelope, opts ...grpc.CallOption) (*MutationReply, error)
// GetState retrieves the cart's current state (JSON).
GetState(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateReply, error)
}
@@ -43,7 +43,7 @@ func NewCartActorClient(cc grpc.ClientConnInterface) CartActorClient {
return &cartActorClient{cc}
}
func (c *cartActorClient) Mutate(ctx context.Context, in *MutationRequest, opts ...grpc.CallOption) (*MutationReply, error) {
func (c *cartActorClient) Mutate(ctx context.Context, in *MutationEnvelope, opts ...grpc.CallOption) (*MutationReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MutationReply)
err := c.cc.Invoke(ctx, CartActor_Mutate_FullMethodName, in, out, cOpts...)
@@ -70,7 +70,7 @@ func (c *cartActorClient) GetState(ctx context.Context, in *StateRequest, opts .
// CartActor exposes mutation and state retrieval for remote grains.
type CartActorServer interface {
// Mutate applies a single mutation to a cart, creating the cart lazily if needed.
Mutate(context.Context, *MutationRequest) (*MutationReply, error)
Mutate(context.Context, *MutationEnvelope) (*MutationReply, error)
// GetState retrieves the cart's current state (JSON).
GetState(context.Context, *StateRequest) (*StateReply, error)
mustEmbedUnimplementedCartActorServer()
@@ -83,7 +83,7 @@ type CartActorServer interface {
// pointer dereference when methods are called.
type UnimplementedCartActorServer struct{}
func (UnimplementedCartActorServer) Mutate(context.Context, *MutationRequest) (*MutationReply, error) {
func (UnimplementedCartActorServer) Mutate(context.Context, *MutationEnvelope) (*MutationReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Mutate not implemented")
}
func (UnimplementedCartActorServer) GetState(context.Context, *StateRequest) (*StateReply, error) {
@@ -111,7 +111,7 @@ func RegisterCartActorServer(s grpc.ServiceRegistrar, srv CartActorServer) {
}
func _CartActor_Mutate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MutationRequest)
in := new(MutationEnvelope)
if err := dec(in); err != nil {
return nil, err
}
@@ -123,7 +123,7 @@ func _CartActor_Mutate_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: CartActor_Mutate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CartActorServer).Mutate(ctx, req.(*MutationRequest))
return srv.(CartActorServer).Mutate(ctx, req.(*MutationEnvelope))
}
return interceptor(ctx, in, info, handler)
}