frontiernext

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Overview

Package frontiernext implements the additive experimental closing relation. Repository verification and current authority policy are independent inputs; neither producer EMPTY nor caller-reported test output is consumed.

Index

Constants

View Source
const OCMProfile = "ocm/0.2-experimental"
View Source
const Profile = "frontier/2-experimental"

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	ClaimID      string `json:"claimId"`
	ObligationID string `json:"obligationId"`
	CheckID      string `json:"checkId"`
	Subject      string `json:"subject"`
	Function     string `json:"function"`
}

type Item

type Item struct {
	ID     string `json:"id"`
	Reason string `json:"reason"`
}

type Recomputer

type Recomputer interface {
	Recompute(context.Context, Request, Selection) (Universe, error)
}

type Request

type Request struct {
	CEM        []byte
	OCM        []byte
	Selection  []byte
	Enrollment localauthority.Enrollment
	Receipt    localauthority.Receipt
}

type Result

type Result struct {
	Profile        string `json:"profile"`
	Authority      string `json:"authority"`
	State          string `json:"state"`
	UniverseSHA256 string `json:"universeSHA256"`
	Open           []Item `json:"open"`
}

func Compute

func Compute(ctx context.Context, r Request, policy localauthority.PolicySnapshot, now time.Time, repo Recomputer) (Result, error)

func ComputeFixture

func ComputeFixture(ctx context.Context, r Request, policy localauthority.PolicySnapshot, now time.Time, repo Recomputer) (Result, error)

ComputeFixture returns authority NONE even when the experimental relation is EMPTY.

type Selection

type Selection struct {
	Profile         string `json:"profile"`
	LegacyOCMSHA256 string `json:"legacyOCMSHA256"`
	Mode            string `json:"mode"`
	Edges           []Edge `json:"edges"`
}

type Universe

type Universe struct {
	Identity    string
	Obligations []string
	Claims      map[string][]string
	Open        []Item
	Eligible    map[Edge]bool
}

Universe is reconstructed by the repository adapter, including every obligation and every unresolved CEM item. Missing edges remain open.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL