Documentation
¶
Index ¶
- Constants
- func AppendToChain(c *Chain, r *Record) error
- func Canonicalize(input []byte, domain CanonDomain) ([]byte, error)
- func ComputeRecordHash(r *Record) (string, error)
- func IsDependencyMissing(err error) bool
- func IsKeyRevoked(list RevocationList, keyID string, at time.Time) bool
- func RegisterCustomType(recordType string, schemaJSON []byte) error
- func RegisterCustomTypeSchema(recordType, schemaPath string) error
- func ResetCustomTypes()
- func ValidateCustomTypeSchema(schemaPath string) error
- func ValidateGovernanceEvent(event GovernanceEvent) error
- func ValidateRecord(r *Record) error
- func Verify(r *Record, publicKey PublicKey) error
- func VerifyChainSignature(c *Chain, sig Signature, pub PublicKey) error
- func VerifyCosign(r *Record, keyPath string) error
- func VerifyCosignWithOptions(r *Record, opts CosignVerifyOpts) error
- func VerifyRevocationList(list RevocationList, pub PublicKey) error
- func WriteRecord(path string, r *Record) error
- type AgentChainHop
- type AgentLineageHop
- type BundleManifest
- func SignBundle(path string, key SigningKey) (*BundleManifest, error)deprecated
- func SignBundleCosign(path string, keyPath string) (*BundleManifest, error)deprecated
- func SignBundleCosignFile(path string, keyPath string) (*BundleManifest, error)
- func SignBundleFile(path string, key SigningKey) (*BundleManifest, error)
- func SignBundleManifest(manifest BundleManifest, key SigningKey) (*BundleManifest, error)
- func SignBundleManifestCosign(manifest BundleManifest, keyPath string) (*BundleManifest, error)
- func VerifyBundle(path string, opts BundleVerifyOpts) (*BundleManifest, error)
- type BundleManifestEntry
- type BundleVerifyOpts
- type CanonDomain
- type Chain
- type ChainVerification
- type Controls
- type CosignVerifyOpts
- type Digest
- type ErrorKind
- type Framework
- type GovernanceEvent
- type LibraryError
- type PolicyRef
- type PublicKey
- type Record
- func NewRecord(opts RecordOpts) (*Record, error)
- func NewRecordFromEvent(event GovernanceEvent, source string) (*Record, error)
- func ReadAndValidateRecord(path string) (*Record, error)
- func ReadRecord(path string) (*Record, error)
- func Sign(r *Record, key SigningKey) (*Record, error)
- func SignCosign(r *Record, keyPath string) (*Record, error)
- type RecordOpts
- type RecordType
- type Relations
- type Relationship
- type RelationshipEdge
- type RelationshipRef
- type RevocationEntry
- type RevocationList
- type Signature
- type SigningKey
Constants ¶
View Source
const ( ErrorKindInvalidInput = coreerr.KindInvalidInput ErrorKindValidation = coreerr.KindValidation ErrorKindVerification = coreerr.KindVerification ErrorKindDependencyMissing = coreerr.KindDependencyMissing ErrorKindInternal = coreerr.KindInternal )
View Source
const ( DomainJSON = canon.DomainJSON DomainSQL = canon.DomainSQL DomainURL = canon.DomainURL DomainText = canon.DomainText DomainPrompt = canon.DomainPrompt )
Variables ¶
This section is empty.
Functions ¶
func AppendToChain ¶
func Canonicalize ¶
func Canonicalize(input []byte, domain CanonDomain) ([]byte, error)
func ComputeRecordHash ¶
func IsDependencyMissing ¶
func IsKeyRevoked ¶
func IsKeyRevoked(list RevocationList, keyID string, at time.Time) bool
func RegisterCustomType ¶
func ResetCustomTypes ¶
func ResetCustomTypes()
func ValidateGovernanceEvent ¶ added in v0.4.2
func ValidateGovernanceEvent(event GovernanceEvent) error
ValidateGovernanceEvent validates a governance event against the embedded governance event schema.
func ValidateRecord ¶
func VerifyCosign ¶
func VerifyCosignWithOptions ¶
func VerifyCosignWithOptions(r *Record, opts CosignVerifyOpts) error
func VerifyRevocationList ¶
func VerifyRevocationList(list RevocationList, pub PublicKey) error
func WriteRecord ¶
Types ¶
type AgentChainHop ¶ added in v0.4.5
type AgentChainHop = record.AgentChainHop
type AgentLineageHop ¶ added in v0.4.5
type AgentLineageHop = record.AgentLineageHop
type BundleManifest ¶
func SignBundle
deprecated
func SignBundle(path string, key SigningKey) (*BundleManifest, error)
Deprecated: SignBundle mutates <path>/manifest.json. Use SignBundleManifest for pure signing or SignBundleFile for explicit file mutation.
func SignBundleCosign
deprecated
func SignBundleCosign(path string, keyPath string) (*BundleManifest, error)
Deprecated: SignBundleCosign mutates <path>/manifest.json. Use SignBundleManifestCosign for pure signing or SignBundleCosignFile for explicit file mutation.
func SignBundleCosignFile ¶ added in v0.4.6
func SignBundleCosignFile(path string, keyPath string) (*BundleManifest, error)
func SignBundleFile ¶ added in v0.4.6
func SignBundleFile(path string, key SigningKey) (*BundleManifest, error)
func SignBundleManifest ¶ added in v0.4.6
func SignBundleManifest(manifest BundleManifest, key SigningKey) (*BundleManifest, error)
func SignBundleManifestCosign ¶ added in v0.4.6
func SignBundleManifestCosign(manifest BundleManifest, keyPath string) (*BundleManifest, error)
func VerifyBundle ¶
func VerifyBundle(path string, opts BundleVerifyOpts) (*BundleManifest, error)
type BundleManifestEntry ¶
type BundleManifestEntry = bundle.ManifestEntry
type BundleVerifyOpts ¶
type BundleVerifyOpts = bundle.VerifyOpts
type CanonDomain ¶
type ChainVerification ¶
type ChainVerification = chain.Verification
func VerifyChain ¶
func VerifyChain(c *Chain) (*ChainVerification, error)
func VerifyChainRange ¶
func VerifyChainRange(c *Chain, from, to time.Time) (*ChainVerification, error)
type CosignVerifyOpts ¶
type CosignVerifyOpts = signing.CosignVerifyOpts
type Digest ¶
func DigestHMACValue ¶
func DigestValue ¶
func DigestValue(input []byte, domain CanonDomain, saltID string) (Digest, error)
type Framework ¶
func LoadFramework ¶
type GovernanceEvent ¶ added in v0.4.2
type GovernanceEvent struct {
EventID string `json:"event_id"`
Timestamp string `json:"timestamp"`
EventType string `json:"event_type"`
AgentID string `json:"agent_id,omitempty"`
ToolName string `json:"tool_name,omitempty"`
Verdict string `json:"verdict,omitempty"`
Context map[string]any `json:"context,omitempty"`
Detail map[string]any `json:"detail,omitempty"`
}
GovernanceEvent is a lightweight, unsigned governance signal that can be promoted into a signed proof record.
type LibraryError ¶ added in v0.4.6
func AsLibraryError ¶ added in v0.4.6
func AsLibraryError(err error) (*LibraryError, bool)
type Record ¶
func NewRecord ¶
func NewRecord(opts RecordOpts) (*Record, error)
func NewRecordFromEvent ¶ added in v0.4.2
func NewRecordFromEvent(event GovernanceEvent, source string) (*Record, error)
NewRecordFromEvent creates a proof.Record from a validated governance event. The caller is responsible for signing and chain-appending the returned record.
func ReadAndValidateRecord ¶ added in v0.4.6
func ReadRecord ¶
type RecordOpts ¶
type RecordOpts = record.RecordOpts
type RecordType ¶
type RecordType = schema.RecordType
func ListRecordTypes ¶
func ListRecordTypes() []RecordType
type Relationship ¶ added in v0.4.5
type Relationship = record.Relationship
type RelationshipEdge ¶ added in v0.4.5
type RelationshipEdge = record.RelationshipEdge
type RelationshipRef ¶ added in v0.4.5
type RelationshipRef = record.RelationshipRef
type RevocationEntry ¶
type RevocationEntry = signing.RevocationEntry
type RevocationList ¶
type RevocationList = signing.RevocationList
func SignRevocationList ¶
func SignRevocationList(list RevocationList, key SigningKey) (RevocationList, error)
type SigningKey ¶
type SigningKey = signing.SigningKey
func GenerateSigningKey ¶
func GenerateSigningKey() (SigningKey, error)
Click to show internal directories.
Click to hide internal directories.