Documentation
¶
Index ¶
- Constants
- func BoundaryOrder() []string
- func Classifications() []string
- func CompileRepositoryInventory(ctx context.Context, root, activation string, authorityID *string, ...) map[string]any
- func SourceClassOrder() []string
- func SummarizeInventoryReceipt(receipt map[string]any, maxEntriesPerClass int) (map[string]any, error)
- func VerifyInventoryReceipt(receipt map[string]any) bool
- type Entry
- type GuidanceSnapshot
- func (s *GuidanceSnapshot) Check(ctx context.Context) error
- func (s *GuidanceSnapshot) CurrentRef(ctx context.Context) (string, error)
- func (s *GuidanceSnapshot) Materialize() (string, error)
- func (s *GuidanceSnapshot) MergeBase(ctx context.Context, a, b string) (string, error)
- func (s *GuidanceSnapshot) Paths(ctx context.Context, a, b string) ([]string, error)
- func (s *GuidanceSnapshot) RefTips(ctx context.Context) (string, error)
- type Limits
- type Record
Constants ¶
const ( Profile = "genesis-inventory/0.1-experimental" SummaryProfile = "genesis-inventory-summary/0.1-experimental" )
Variables ¶
This section is empty.
Functions ¶
func BoundaryOrder ¶
func BoundaryOrder() []string
BoundaryOrder returns the canonical boundary vocabulary in wire order.
func Classifications ¶
func Classifications() []string
Classifications returns the canonical classification vocabulary in wire order.
func CompileRepositoryInventory ¶
func CompileRepositoryInventory(ctx context.Context, root, activation string, authorityID *string, revision string, excludedPrefixes []string) map[string]any
CompileRepositoryInventory compiles the frozen read-only Genesis receipt.
func SourceClassOrder ¶
func SourceClassOrder() []string
SourceClassOrder returns the canonical source-class vocabulary in wire order.
func SummarizeInventoryReceipt ¶
func SummarizeInventoryReceipt(receipt map[string]any, maxEntriesPerClass int) (map[string]any, error)
SummarizeInventoryReceipt returns the sealed bounded default CLI view.
func VerifyInventoryReceipt ¶
Types ¶
type Entry ¶
type Entry struct {
Mode string
ObjectType string
OID string
Path *string
PathSHA256 string
Size *int64
}
Entry is already-read Git tree metadata consumed by ClassifyEntry.
type GuidanceSnapshot ¶
type GuidanceSnapshot struct {
Revision string
Tree string
Records []Record
Blobs map[string][]byte
Omitted int
// contains filtered or unexported fields
}
GuidanceSnapshot exposes the bounded immutable inventory to advisory composers. Mutable observations are limited to admission and the final consistency check.
func OpenGuidance ¶
func OpenGuidance(ctx context.Context, root string) (*GuidanceSnapshot, error)
func (*GuidanceSnapshot) CurrentRef ¶
func (s *GuidanceSnapshot) CurrentRef(ctx context.Context) (string, error)
func (*GuidanceSnapshot) Materialize ¶
func (s *GuidanceSnapshot) Materialize() (string, error)
Materialize writes only admitted regular immutable blobs in private scratch. The caller owns removal; no repository file, symlink or command is executed.
type Limits ¶
type Limits struct {
MaxEntries int
MaxTreeBytes int
MaxBlobBytes int64
MaxTotalBlobBytes int64
MaxPathBytes int
MaxReceiptBytes int
GitTimeout time.Duration
TotalTimeout time.Duration
}
Limits contains the validated Genesis limits used by the classifier.
type Record ¶
type Record struct {
Boundaries []string `json:"boundaries"`
Classification string `json:"classification"`
Classes []string `json:"classes"`
Mode string `json:"mode"`
ObjectType string `json:"objectType"`
OID string `json:"oid"`
Path *string `json:"path"`
PathSHA256 string `json:"pathSha256"`
Reason string `json:"reason"`
Roles []string `json:"roles"`
Size *int64 `json:"size"`
}
Record is the exact per-entry Genesis inventory record.