trust

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 10 Imported by: ? modules, 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

Overview

Package trust is the pure-Go reference for the C engine's scoped package trust records. Hosts supply a protected parent directory and serialize writers across processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path string
	// contains filtered or unexported fields
}

func New

func New(path string) (*File, error)

func (*File) Record

func (f *File) Record(scope, id, digest string) error

func (*File) Records

func (f *File) Records(scope string) ([]Record, error)

Records returns a copy of one scope's reviewed records for diagnostics and migration. A record is not evidence that the installed package still matches.

func (*File) Revoke

func (f *File) Revoke(scope, id string) error

func (*File) RevokeAll

func (f *File) RevokeAll(id string) error

RevokeAll removes every approval for one package, including scopes owned by consumers unknown to the installer. The caller serializes package writers.

func (*File) StateOf

func (f *File) StateOf(scope, id, current string) (State, error)

type Record

type Record struct {
	Scope  string `json:"scope"`
	ID     string `json:"id"`
	Digest string `json:"digest"`
}

type State

type State uint8
const (
	Untrusted State = iota
	Trusted
	Changed
)

Jump to

Keyboard shortcuts

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