Files
sharangandClaude Opus 5.5 1b9e2f1183
ci / shared (push) Successful in 12s
ci / test (push) Successful in 24m37s
ci / image (push) Successful in 44s
feat: role and authority dataset (R1 S0) (#93)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-10-26 21:18:57 +00:00

30 lines
957 B
Go

package store
import (
"encoding/json"
"time"
)
// Role and authority dataset (0024, R1 S0): one document per tenant, checked
// by internal/roles before it reaches the store. The store only versions it;
// a decision record names the revision it was made under.
type RoleDataset struct {
TenantID string `json:"tenant_id"`
Data json.RawMessage `json:"data"`
CatalogueVersion string `json:"catalogue_version"`
Revision int `json:"revision"`
UpdatedBy string `json:"updated_by"`
UpdatedAt time.Time `json:"updated_at"`
}
// RoleDatasetWrite is one save. ExpectedRevision is the revision the writer
// last read, 0 when there was none; By is the writer's Keycloak sub.
type RoleDatasetWrite struct {
TenantID string
Data json.RawMessage
CatalogueVersion string
ExpectedRevision int
By string
At time.Time
}