clone

package
v0.1.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDirectoryNotEmpty = errors.New("the current directory is not a SAL project and is not empty; run sal pull inside an initialized project, or in an empty directory for the pull to initialize one from the artifact")

ErrDirectoryNotEmpty is returned by a pull outside a SAL project when the current directory holds anything, since a pull only initializes a directory it can make a project of from nothing.

Functions

This section is empty.

Types

type OciArtifactRetrievalCmd

type OciArtifactRetrievalCmd struct {
	Artifact    string `arg:"positional" help:"Full URL of the OCI artifact to pull. Example: ghcr.io/my-username/my-repository:latest"`
	Username    string `arg:"--username,env:OCI_USERNAME" help:"Username for the OCI registry"`
	Password    string `arg:"--password,env:OCI_PASSWORD" help:"Password for the OCI registry"`
	Destination string `` /* 171-byte string literal not displayed */
	NoTUI       bool   `arg:"--no-tui" help:"write the log to stderr as it happens instead of opening the progress and log panes"`
	Parallel    int    `arg:"--parallel" default:"16" help:"how many files to pull from the registry at once"`
}

func (*OciArtifactRetrievalCmd) GetArtifactReference

func (cmd *OciArtifactRetrievalCmd) GetArtifactReference() (pkg.ArtifactReference, error)

func (*OciArtifactRetrievalCmd) GetPassword

func (cmd *OciArtifactRetrievalCmd) GetPassword() string

func (*OciArtifactRetrievalCmd) GetUsername

func (cmd *OciArtifactRetrievalCmd) GetUsername() string

func (*OciArtifactRetrievalCmd) RunClone

func (cmd *OciArtifactRetrievalCmd) RunClone() (err error)

RunClone clones the source repository the artifact names at the commit it was built from, initializes it as a SAL project, and pulls the data product into it. The invocation is one trace, `sal.clone`, which the progress pane follows step by step.

func (*OciArtifactRetrievalCmd) RunPull

func (cmd *OciArtifactRetrievalCmd) RunPull() (err error)

RunPull pulls the snapshots the remote artifact has that the local data product lacks. Outside a SAL project it initializes one in the current directory, which must be empty, from what the artifact's manifest records, so a data product can be pulled somewhere new without `sal init` first. The invocation is one trace, `sal.pull`, which the progress pane follows: the manifest, then the layers as they arrive.

Jump to

Keyboard shortcuts

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