Documentation
¶
Index ¶
- Constants
- func LoadReviewedThreadstorePhysicalSchema(path string) (map[string][]string, map[string]string, map[string]string, error)
- func Validate(registry Registry, findings []Finding) []string
- func ValidateThreadstoreBoundaryManifest(manifest ThreadstoreBoundaryManifest, schemaColumns map[string][]string, ...) []string
- func WriteRegistry(path string, registry Registry) error
- func WriteThreadstoreBoundaryManifest(path string, manifest ThreadstoreBoundaryManifest) error
- type Finding
- type Registry
- type RegistryEntry
- type ThreadstoreBoundaryManifest
- func LoadThreadstoreBoundaryManifest(path string) (ThreadstoreBoundaryManifest, error)
- func RefreshThreadstorePhysicalContracts(manifest ThreadstoreBoundaryManifest, columns map[string][]string, ...) (ThreadstoreBoundaryManifest, error)
- func RefreshThreadstoreQueries(existing ThreadstoreBoundaryManifest, scanned []ThreadstoreQueryContract) ThreadstoreBoundaryManifest
- func RefreshThreadstoreUsageContracts(manifest ThreadstoreBoundaryManifest) ThreadstoreBoundaryManifest
- type ThreadstoreIndexUse
- type ThreadstoreQueryContract
- type ThreadstoreTableContract
- type ThreadstoreTriggerUse
Constants ¶
View Source
const ( ReviewStatusReviewed = "reviewed" ReviewStatusPendingReview = "pending_review" )
View Source
const RegistryVersion = 1
View Source
const ThreadstoreBoundaryManifestVersion = 1
Variables ¶
This section is empty.
Functions ¶
func ValidateThreadstoreBoundaryManifest ¶
func ValidateThreadstoreBoundaryManifest(manifest ThreadstoreBoundaryManifest, schemaColumns map[string][]string, schemaIndexes map[string]string, schemaTriggers map[string]string, scanned []ThreadstoreQueryContract) []string
func WriteRegistry ¶
func WriteThreadstoreBoundaryManifest ¶
func WriteThreadstoreBoundaryManifest(path string, manifest ThreadstoreBoundaryManifest) error
Types ¶
type Finding ¶
type Registry ¶
type Registry struct {
Version int `json:"version"`
Entries []RegistryEntry `json:"entries"`
}
func LoadRegistry ¶
func RefreshRegistry ¶
RefreshRegistry preserves review metadata only when the previously reviewed source fingerprint and scanner inventory still match exactly. Every other finding requires an explicit human or agent review before validation passes.
type RegistryEntry ¶
type RegistryEntry struct {
Path string `json:"path"`
SHA256 string `json:"sha256"`
SinkKinds []string `json:"sink_kinds"`
ReviewStatus string `json:"review_status"`
Owner string `json:"owner"`
Authority string `json:"authority"`
DataClasses []string `json:"data_classes"`
Tables []string `json:"tables,omitempty"`
Keys []string `json:"keys,omitempty"`
Codecs []string `json:"codecs,omitempty"`
DTOs []string `json:"dtos,omitempty"`
ReviewNote string `json:"review_note"`
}
func NewReviewedEntry ¶
func NewReviewedEntry(finding Finding) RegistryEntry
type ThreadstoreBoundaryManifest ¶
type ThreadstoreBoundaryManifest struct {
Version int `json:"version"`
Tables []ThreadstoreTableContract `json:"tables"`
Queries []ThreadstoreQueryContract `json:"queries"`
}
func LoadThreadstoreBoundaryManifest ¶
func LoadThreadstoreBoundaryManifest(path string) (ThreadstoreBoundaryManifest, error)
func RefreshThreadstorePhysicalContracts ¶
func RefreshThreadstorePhysicalContracts(manifest ThreadstoreBoundaryManifest, columns map[string][]string, indexes, triggers map[string]string) (ThreadstoreBoundaryManifest, error)
func RefreshThreadstoreQueries ¶
func RefreshThreadstoreQueries(existing ThreadstoreBoundaryManifest, scanned []ThreadstoreQueryContract) ThreadstoreBoundaryManifest
func RefreshThreadstoreUsageContracts ¶
func RefreshThreadstoreUsageContracts(manifest ThreadstoreBoundaryManifest) ThreadstoreBoundaryManifest
type ThreadstoreIndexUse ¶
type ThreadstoreQueryContract ¶
type ThreadstoreQueryContract struct {
ID string `json:"id"`
Path string `json:"path"`
Function string `json:"function"`
Method string `json:"method"`
SQLSHA256 string `json:"sql_sha256,omitempty"`
BuilderSHA256 string `json:"builder_sha256,omitempty"`
Tables []string `json:"tables,omitempty"`
LookupKeys []string `json:"lookup_keys,omitempty"`
ReadColumns []string `json:"read_columns,omitempty"`
WriteColumns []string `json:"write_columns,omitempty"`
Action string `json:"action"`
Consumer string `json:"consumer"`
ConsumerKind string `json:"consumer_kind"`
DynamicReview string `json:"dynamic_review,omitempty"`
RenderedSQLExpr string `json:"rendered_sql_expression,omitempty"`
}
func ScanThreadstoreSQL ¶
func ScanThreadstoreSQL(root string) ([]ThreadstoreQueryContract, error)
type ThreadstoreTableContract ¶
type ThreadstoreTableContract struct {
Table string `json:"table"`
Columns []string `json:"columns"`
Indexes []string `json:"indexes"`
Triggers []string `json:"triggers"`
IndexUses []ThreadstoreIndexUse `json:"index_uses"`
TriggerUses []ThreadstoreTriggerUse `json:"trigger_uses"`
Owner string `json:"owner"`
Authority string `json:"authority"`
DataClass string `json:"data_class"`
AllowedPurpose string `json:"allowed_purpose"`
AllowedLookupKeys []string `json:"allowed_lookup_keys"`
Consumers []string `json:"consumers"`
RetentionOrDeletion string `json:"retention_or_deletion"`
CanonicalIdentity string `json:"canonical_identity"`
APIUIVisibility string `json:"api_ui_visibility"`
LifecycleProhibition string `json:"lifecycle_prohibition"`
Phase1CDecision string `json:"phase_1c_decision,omitempty"`
}
type ThreadstoreTriggerUse ¶
Click to show internal directories.
Click to hide internal directories.