all the refactor
Build and Publish / BuildAndDeployAmd64 (push) Failing after 5s
Build and Publish / BuildAndDeployArm64 (push) Failing after 6s

This commit is contained in:
2026-06-28 17:51:52 +02:00
parent 7db0d236c7
commit aa8b2bdedc
84 changed files with 4328 additions and 2344 deletions
+8 -7
View File
@@ -7,18 +7,19 @@ import (
"os"
messages "git.k6n.net/mats/go-cart-actor/proto/cart"
"git.k6n.net/mats/platform/money"
)
type Rule struct {
Type string `json:"type"`
Value int64 `json:"value"`
Type string `json:"type"`
Value money.Cents `json:"value"`
}
type Voucher struct {
Code string `json:"code"`
Value int64 `json:"value"`
Rules string `json:"rules"`
Description string `json:"description,omitempty"`
Code string `json:"code"`
Value money.Cents `json:"value"`
Rules string `json:"rules"`
Description string `json:"description,omitempty"`
}
type Service struct {
@@ -42,7 +43,7 @@ func (s *Service) GetVoucher(code string) (*messages.AddVoucher, error) {
return &messages.AddVoucher{
Code: code,
Value: v.Value,
Value: v.Value.Int64(), // proto boundary: AddVoucher.Value is int64
Description: v.Description,
VoucherRules: []string{
v.Rules,