serve

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(root *cobra.Command)

Types

type AssessRequest added in v0.12.0

type AssessRequest struct {
	Action         string         `json:"action"`
	Facts          []string       `json:"facts,omitempty"`
	SecurityLabels []string       `json:"security_labels,omitempty"`
	Metadata       map[string]any `json:"metadata,omitempty"`
	Payload        any            `json:"payload,omitempty"`
}

type AssessResponse added in v0.12.0

type AssessResponse struct {
	Decision   string         `json:"decision"` // "ALLOW" or "HALT"
	DecisionID string         `json:"decision_id"`
	PolicyHash string         `json:"policy_hash,omitempty"`
	Action     string         `json:"action,omitempty"`
	Payload    any            `json:"payload,omitempty"`
	Metadata   map[string]any `json:"metadata,omitempty"`
}

type DenyResponse added in v0.12.0

type DenyResponse struct {
	Decision   string   `json:"decision"` // "HALT"
	DecisionID string   `json:"decision_id"`
	PolicyHash string   `json:"policy_hash,omitempty"`
	RuleID     string   `json:"rule_id,omitempty"`
	Tier       string   `json:"tier,omitempty"`
	Reasons    []string `json:"reasons"`
	ProofTree  string   `json:"proof_tree,omitempty"`
}

type ExplainRequest added in v0.12.0

type ExplainRequest struct {
	Query string   `json:"query"`
	Facts []string `json:"facts"`
}

type ExplainResponse added in v0.12.0

type ExplainResponse struct {
	Outcome    bool   `json:"outcome"`
	PolicyHash string `json:"policy_hash,omitempty"`
	ProofTree  string `json:"proof_tree"`
}

type HealthResponse added in v0.12.0

type HealthResponse struct {
	Status       string `json:"status"`
	PolicyLoaded bool   `json:"policy_loaded"`
	PolicyHash   string `json:"policy_hash,omitempty"`
}

type PolicyResponse added in v0.12.0

type PolicyResponse struct {
	PolicyPath string `json:"policy_path"`
	PolicyHash string `json:"policy_hash"`
}

type ServerState added in v0.12.0

type ServerState struct {
	Client     *sdk.Client
	PolicyPath string
	PolicyHash atomic.Value // string
}

ServerState tracks the active client, policy path, and cryptographic policy fingerprint.

func (*ServerState) GetPolicyHash added in v0.12.0

func (s *ServerState) GetPolicyHash() string

func (*ServerState) SetPolicyHash added in v0.12.0

func (s *ServerState) SetPolicyHash(h string)

Jump to

Keyboard shortcuts

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