publish

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	CatalogDir   string   // contains pkgs/<name>/pkg.yaml; defaults to "."
	RegistryBase string   // e.g. ghcr.io/vi-dev/nem-catalog
	Tags         []string // >= 1 unless DryRun
	Force        bool     // publish despite lint findings
	DryRun       bool     // assemble + report, no registry writes
}

Options configures a publish run.

type Publisher

type Publisher interface {
	Publish(ctx context.Context, catalogRepo string, pkgs []oci.PackageBlob, tags []string) (oci.PublishResult, error)
	Plan(ctx context.Context, pkgs []oci.PackageBlob) (oci.PublishResult, error)
}

Publisher is the registry write surface the orchestrator needs. *oci.Publisher satisfies it; tests inject a fake.

type Reporter

type Reporter interface {
	report.Basic
}

Reporter receives human-facing progress (Info) and warnings (Warn).

var Discard Reporter = discard{}

Discard drops all progress output.

type Result

type Result struct {
	IndexDigest string
	CatalogRepo string
	Tags        []string
	Packages    []oci.PackageDigest
}

Result reports the outcome of a publish run.

func Publish

func Publish(ctx context.Context, pub Publisher, r Reporter, o Options) (Result, error)

Publish reads the catalog directory, lint-gates it, and publishes (or plans) it.

Jump to

Keyboard shortcuts

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