publish

package
v5.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 29 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 publish implements publishing a Compose application as an OCI artifact: the pre-checks on what it would leak, the layers, and the push.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// DistributionAPI resolves the digests of the images through the Docker daemon.
	DistributionAPI() client.DistributionAPIClient
	// SystemAPI reads the daemon, to tell whether Docker Desktop is the engine.
	SystemAPI() client.SystemAPIClient
	// AuthProvider supplies the registry credentials.
	AuthProvider() registry.AuthProvider
	// Events receives the progress of the operation.
	Events() api.EventProcessor
	// DryRun tells whether the operation only reports what it would do.
	DryRun() bool
	// Prompt asks the user a yes/no question.
	Prompt(message string, defaultValue bool) (bool, error)
	// Push pushes the images built for the project, as part of the operation
	// already running: it opens no progress bracket of its own.
	Push(ctx context.Context, project *types.Project, options api.PushOptions) error
}

Backend is what publishing needs from the engine it acts on.

type Service

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

Service publishes projects on a Backend.

func New

func New(backend Backend) *Service

New creates a Service acting on the given Backend.

func (*Service) Publish

func (s *Service) Publish(ctx context.Context, project *types.Project, repository string, options api.PublishOptions) error

Publish publishes the project as an OCI artifact to the repository. It does not open a progress bracket: the caller wraps it in the "publish" one.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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