lock

package
v1.234.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package lock records reproducible plugin selections independently of local overrides.

Index

Constants

View Source
const Kind = "AtmosPluginLock"

Variables

This section is empty.

Functions

func CheckDeclarations

func CheckDeclarations(file *File, declarations map[string]schema.PluginPackage) error

CheckDeclarations enforces exact dependency/lock agreement in frozen mode.

func CheckRelease

func CheckRelease(entry *Entry, release *pluginoci.Release) error

CheckRelease prevents tag movement or layout substitution from changing a lock.

func Path

func Path(project string) string

Path returns the project lock location beside its root configuration.

func Save

func Save(project string, file *File) error

Save atomically writes a prepared lock. The caller owns the transaction lock.

Types

type Entry

type Entry struct {
	Plugin       string            `yaml:"plugin" json:"plugin"`
	Source       string            `yaml:"source" json:"source"`
	Constraint   string            `yaml:"constraint" json:"constraint"`
	Version      string            `yaml:"version" json:"version"`
	IndexDigest  string            `yaml:"index_digest" json:"index_digest"`
	Platforms    map[string]string `yaml:"platforms" json:"platforms"`
	Runtime      manifest.Runtime  `yaml:"runtime" json:"runtime"`
	Exports      []Export          `yaml:"exports" json:"exports"`
	Verification Verification      `yaml:"verification" json:"verification"`
}

Entry contains the source constraint and the exact release/platform digests.

type Export

type Export struct {
	Capability string `yaml:"capability" json:"capability"`
	Name       string `yaml:"name" json:"name"`
}

Export identifies one statically validated extension.

type File

type File = atmosmanifest.Manifest[Spec]

File is a standard versioned Atmos manifest.

func Load

func Load(project string) (*File, error)

Load reads an optional lock and validates all entries without network access.

func New

func New() *File

New creates an empty release lock.

type Spec

type Spec struct {
	LockVersion  int              `yaml:"lock_version" json:"lock_version"`
	GeneratedAt  time.Time        `yaml:"generated_at" json:"generated_at"`
	AtmosVersion string           `yaml:"atmos_version" json:"atmos_version"`
	Packages     map[string]Entry `yaml:"packages" json:"packages"`
}

Spec records immutable release choices; timestamps never affect frozen equality.

type Verification

type Verification struct {
	Signature string `yaml:"signature" json:"signature"`
	Identity  string `yaml:"identity,omitempty" json:"identity,omitempty"`
	Issuer    string `yaml:"issuer,omitempty" json:"issuer,omitempty"`
}

Verification distinguishes integrity from publisher identity.

Jump to

Keyboard shortcuts

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