manifest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package manifest defines the closed public v1 installation metadata model for executable backend plugins. It contains no filesystem or process I/O.

Index

Constants

View Source
const (
	MaxManifestBytes   = 256 << 10
	MaxExports         = 64
	MaxPlatforms       = 32
	MaxExtensions      = 8
	MaxStringBytes     = 512
	MaxPluginIDBytes   = 128
	MaxExecutableBytes = 256
)
View Source
const SchemaV1 = "golip.backendplugin.manifest/v1"

SchemaV1 is the only closed manifest schema identifier accepted in Phase 2.

Variables

View Source
var (
	ErrInvalidManifest      = errors.New("backendplugin/manifest: invalid manifest")
	ErrUnknownSchema        = errors.New("backendplugin/manifest: unknown schema")
	ErrUnknownField         = errors.New("backendplugin/manifest: unknown field")
	ErrForbiddenField       = errors.New("backendplugin/manifest: forbidden field")
	ErrUnsupportedExtension = errors.New("backendplugin/manifest: unsupported extension")
	ErrBoundsExceeded       = errors.New("backendplugin/manifest: bounds exceeded")
	ErrDuplicateExport      = errors.New("backendplugin/manifest: duplicate export kind")
	ErrInvalidExecutable    = errors.New("backendplugin/manifest: invalid executable path")
	ErrInvalidDigest        = errors.New("backendplugin/manifest: invalid sha256")
	ErrInvalidPlatform      = errors.New("backendplugin/manifest: invalid platform")
	// ErrInconsistentExportSecurityPosture rejects an export whose declared
	// credential mode contradicts its declared access scope. Under the host
	// principal model a user-scoped OAuth credential is never valid in a shared
	// deployment, so credential_mode: oauth_user must declare
	// access_scope: local_only instead of advertising broad eligibility.
	ErrInconsistentExportSecurityPosture = errors.New("backendplugin/manifest: inconsistent export security posture")
)

Functions

This section is empty.

Types

type Export

type Export struct {
	Kind           string
	DisplayName    string
	Description    string
	CredentialMode backendplugin.CredentialMode
	AccessScope    backendplugin.AccessScope
	ProcessSharing backendplugin.ProcessSharing
	ExecutionClass lipsdk.BackendExecutionClass
	Experimental   bool
	Deprecated     bool
}

Export describes one factory kind exported by the plugin.

type Extension

type Extension struct {
	Name    string
	Version uint32
}

Extension is a versioned, allowlisted metadata block. v1 ships with an empty allowlist; non-empty unknown extensions are rejected by the strict parser.

type Manifest

type Manifest struct {
	Schema           string
	PluginID         string
	Version          string
	BuildID          string
	Executable       string
	SHA256           string
	ProtocolMajor    uint32
	ProtocolMinMinor uint32
	ProtocolMaxMinor uint32
	Platforms        []Platform
	Exports          []Export
	Extensions       []Extension
}

Manifest is the public installation metadata document for one plugin artifact.

func (Manifest) RequiresWindowsEXE

func (m Manifest) RequiresWindowsEXE() bool

RequiresWindowsEXE reports whether any platform requires a .exe executable suffix.

func (Manifest) Validate

func (m Manifest) Validate() error

Validate checks semantic bounds of a decoded Manifest without I/O.

type Platform

type Platform struct {
	OS   string
	Arch string
}

Platform is one supported OS/architecture pair.

Jump to

Keyboard shortcuts

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