Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
30 lines
957 B
Go
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
|
|
}
|