registry

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package registry fetches and publishes module artifacts (SAVF + metadata) against a backend: an IFS directory, a SAVF host, or an S3-compatible bucket.

Index

Constants

View Source
const VersionsFile = "versions.json"

VersionsFile is the per-package index file name inside the registry.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlreadyExistsError

type AlreadyExistsError struct{ Name, Version string }

AlreadyExistsError is returned when publishing a version that already exists and force was not requested.

func (*AlreadyExistsError) Error

func (e *AlreadyExistsError) Error() string

type File

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

File is a registry backed by a local directory tree:

<root>/<name>/versions.json

It implements resolver.Registry. This is the MVP backend; the IFS/SAVF/S3 backends will satisfy the same interface later.

func Open

func Open(dir string) *File

Open returns a File registry rooted at dir.

func (*File) Fetch

func (f *File) Fetch(artifact string) ([]byte, error)

Fetch returns the raw bytes of an artifact identified by its registry-relative path (the "artifact" field of versions.json).

func (*File) Publish

func (f *File) Publish(in PublishInput, force bool) (artifactRel, hash string, err error)

Publish writes the artifact under <name>/<version>/ and upserts the package's versions.json. It returns the registry-relative artifact path and its sha256 digest ("sha256:...").

func (*File) Versions

func (f *File) Versions(name string) ([]resolver.Available, error)

Versions returns the available (non-yanked) versions of a package. A missing package file yields an empty slice, which the resolver reports as "not found".

type NamedBlob

type NamedBlob struct {
	Name string
	Data []byte
}

NamedBlob is a file (basename + contents) shipped alongside the artifact.

type PublishInput

type PublishInput struct {
	Name         string
	Version      string
	Library      string
	Srvpgm       string
	Signature    string
	Dependencies map[string]string
	ArtifactName string // base filename to store, e.g. "MODFACT.savf"
	Artifact     []byte
	Schema       string      // migration target schema
	Migrations   []NamedBlob // ordered migration files
}

PublishInput describes one version being published.

Jump to

Keyboard shortcuts

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