artifacts

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 28 Imported by: 1 module, 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 artifacts implements the `atmos artifacts` command space: publish, pull, copy, inspect, list, search, delete, sign, verify, and show.

The commands are thin wiring. They parse flags with the standard flag parser, build the artifact service through the composition root in pkg/artifact/compose, call one service method, and render the typed result. Packaging, repository access, signatures, locks, and conflict policy all live in the artifact service and its repositories, so the commands, workflow steps, and hooks share one implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cobra.Command

NewCommand builds the `atmos artifacts` command tree with fresh flag parsers. The registered command is built once at package initialization; tests build their own to start from default flags.

func NewKindPublishCommand

func NewKindPublishCommand(spec *KindPublishSpec) *cobra.Command

NewKindPublishCommand builds a convenience publish command for one artifact kind.

func SetAtmosConfig

func SetAtmosConfig(config *schema.AtmosConfiguration)

SetAtmosConfig is called from root.go after the configuration is initialized.

func UseCatalogFactory

func UseCatalogFactory(factory CatalogFactory) (restore func())

UseCatalogFactory replaces the catalog service factory and returns a function that restores the previous one. It is the seam command tests use; production code never calls it.

func UseServiceFactory

func UseServiceFactory(factory ServiceFactory) (restore func())

UseServiceFactory replaces the service factory and returns a function that restores the previous one. It is the seam command tests use to run the real commands against injected repositories, verifiers, and signers; production code never calls it.

Types

type CatalogFactory

type CatalogFactory func(config *schema.AtmosConfiguration) (catalog.Maintainer, error)

CatalogFactory builds the catalog maintenance service for the loaded configuration. Tests replace it to inject a fake; production composes the real repositories lazily, so building the service performs no network access, credential resolution, or directory creation.

type CommandProvider

type CommandProvider struct{}

CommandProvider registers the artifacts commands with the standard command registry.

func (*CommandProvider) GetAliases

func (*CommandProvider) GetAliases() []internal.CommandAlias

GetAliases returns nil: the commands have no aliases.

func (*CommandProvider) GetCommand

func (*CommandProvider) GetCommand() *cobra.Command

GetCommand returns the artifacts parent command with every subcommand attached.

func (*CommandProvider) GetCompatibilityFlags

func (*CommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag

GetCompatibilityFlags returns nil: the commands use native Cobra flags only.

func (*CommandProvider) GetFlagsBuilder

func (*CommandProvider) GetFlagsBuilder() flags.Builder

GetFlagsBuilder returns nil: the subcommands own their flags.

func (*CommandProvider) GetGroup

func (*CommandProvider) GetGroup() string

GetGroup returns the command group for help organization.

func (*CommandProvider) GetName

func (*CommandProvider) GetName() string

GetName returns the command name.

func (*CommandProvider) GetPositionalArgsBuilder

func (*CommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder

GetPositionalArgsBuilder returns nil: the parent command takes no positional arguments.

func (*CommandProvider) IsExperimental

func (*CommandProvider) IsExperimental() bool

IsExperimental reports that the artifacts commands are experimental in V1.

type KindPublishSpec

type KindPublishSpec struct {
	// Use is the command usage line, for example "publish <source>".
	Use string

	// Short is the one-line description.
	Short string

	// Long is the long description.
	Long string

	// Example is the rendered usage examples.
	Example string

	// Kind is the artifact kind the command publishes, for example "scaffold".
	Kind string

	// Prefix is the Viper key prefix that keeps this command's values apart from every other
	// command's, for example "scaffold.publish".
	Prefix string

	// Usage is the argument usage shown when the source argument is missing.
	Usage string
}

KindPublishSpec describes a convenience publish command that supplies its artifact kind, such as `atmos scaffold publish`. The command delegates to the same publish pipeline as `atmos artifacts publish`: same flags (without --kind), same environment variables, same service, same result rendering, so the two can never drift.

type ServiceFactory

type ServiceFactory = invoke.ServiceFactory

ServiceFactory builds the artifact service for the loaded configuration. Tests replace newService to inject a fake service; production composes the real repositories lazily, so building the service performs no network access, credential resolution, or directory creation.

type ServiceOptions

type ServiceOptions = invoke.ServiceOptions

ServiceOptions are the per-invocation settings that reach the composition root.

Jump to

Keyboard shortcuts

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