feat: implement Foundation V1 walking skeleton
CI / test (push) Successful in 7m31s

This commit is contained in:
m
2026-08-16 15:22:49 +03:00
commit 9b136621ef
205 changed files with 6345 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# platform
Only shared **technical mechanisms** may live here. No shared domain objects. Platform packages cannot import semantic modules.
+9
View File
@@ -0,0 +1,9 @@
package clock
import "time"
type Clock interface{ Now() time.Time }
type Real struct{}
func (Real) Now() time.Time { return time.Now().UTC() }
+22
View File
@@ -0,0 +1,22 @@
package errors
type Kind string
const (
Rejected Kind = "REJECTED"
Failed Kind = "FAILED"
UnknownOutcome Kind = "UNKNOWN_OUTCOME"
TemporarilyUnavailable Kind = "TEMPORARILY_UNAVAILABLE"
Conflict Kind = "CONFLICT"
Stale Kind = "STALE"
Unauthorized Kind = "UNAUTHORIZED"
Unsupported Kind = "UNSUPPORTED"
)
type Error struct {
Kind Kind
Code string
Message string
}
func (e Error) Error() string { return e.Message }
+19
View File
@@ -0,0 +1,19 @@
package ids
import (
"crypto/rand"
"encoding/hex"
"fmt"
)
// ID is a transport-neutral opaque identifier primitive. Domain packages wrap it
// in strong semantic ID types; do not pass bare ID across semantic boundaries.
type ID string
func New() (ID, error) {
var b [16]byte
if _, err := rand.Read(b[:]); err != nil {
return "", fmt.Errorf("generate id: %w", err)
}
return ID(hex.EncodeToString(b[:])), nil
}