Files
mats 528c59bfd3
Build and Publish / BuildAndDeployAmd64 (push) Failing after 4s
Build and Publish / BuildAndDeployArm64 (push) Failing after 6s
cart and checkout
2026-06-27 19:49:00 +02:00

21 lines
445 B
Go

package profile
import (
"fmt"
messages "git.k6n.net/mats/go-cart-actor/proto/profile"
)
// HandleAnonymizeProfile wipes all PII from the customer profile.
func HandleAnonymizeProfile(p *ProfileGrain, m *messages.AnonymizeProfile) error {
if m == nil {
return fmt.Errorf("AnonymizeProfile: nil payload")
}
p.Name = ""
p.Email = ""
p.Phone = ""
p.AvatarUrl = ""
p.Addresses = nil // Clear all addresses containing PII
return nil
}