catalog

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: GPL-3.0 Imports: 17 Imported by: 0 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 catalog verifies the signed metadata and content digests used for independently released plugin executables.

Index

Constants

View Source
const (
	MaxArtifactBytes = 128 << 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	Version     int       `json:"version"`
	Channel     string    `json:"channel"`
	Sequence    uint64    `json:"sequence"`
	GeneratedAt time.Time `json:"generated_at"`
	Plugins     []Entry   `json:"plugins"`
}

func Verify

func Verify(data, envelopeData []byte, keyring Keyring, lastSequence uint64, now time.Time) (Catalog, error)

func (Catalog) Resolve

func (c Catalog) Resolve(id, version, goos, goarch string) (Entry, error)

type ConfigSchemaDeclaration

type ConfigSchemaDeclaration = configschema.Declaration

type Entry

type Entry struct {
	ID             string `json:"id"`
	Version        string `json:"version"`
	OS             string `json:"os"`
	Arch           string `json:"arch"`
	URL            string `json:"url"`
	SHA256         string `json:"sha256"`
	CompressedSize int64  `json:"compressed_size"`
	ArchiveFormat  string `json:"archive_format"`
	Executable     string `json:"executable"`
	Manifest       string `json:"manifest"`
}

type Keyring

type Keyring map[string]ed25519.PublicKey

type PackageManifest

type PackageManifest struct {
	ID               string                         `json:"id"`
	Version          string                         `json:"version"`
	ProtocolVersion  string                         `json:"protocol_version"`
	Executable       string                         `json:"executable"`
	ExecutableSHA256 string                         `json:"executable_sha256"`
	ExecutableSize   int64                          `json:"executable_size"`
	ExecutionModes   []protocol.ExecutionMode       `json:"execution_modes"`
	Channels         []protocol.Channel             `json:"channels"`
	Operations       []protocol.OperationDescriptor `json:"operations,omitempty"`
	ConfigSchema     *configschema.Declaration      `json:"config_schema,omitempty"`
	Assets           []assets.Declaration           `json:"assets"`
}

PackageManifest is transitively authenticated by the signed catalog's artifact digest and supplies runtime plugin and asset declarations.

func VerifyPackageManifest

func VerifyPackageManifest(data []byte, entry Entry, root string) (PackageManifest, error)

VerifyPackageManifest strictly binds extracted declarations to the catalog entry.

Jump to

Keyboard shortcuts

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