commands

package
v0.0.0-...-85991d7 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: LGPL-2.1 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const ConfigKeyAutosync = "pkg.autosync"
View Source
const ConfigKeyRegistries = "pkg.registries"

Variables

This section is empty.

Functions

func ErrorMessage

func ErrorMessage(err error) string

func FirstError

func FirstError(errors ...error) error

func IsAlreadyExistsError

func IsAlreadyExistsError(err error) bool

func Pkg

func Pkg(run Run, track tracking.Track, configStore ConfigStore, ui tpkg.UI) (*cobra.Command, error)

Types

type CobraCommand

type CobraCommand func(cmd *cobra.Command, args []string)

func DefaultRunWrapper

func DefaultRunWrapper(f CobraErrorCommand) CobraCommand

type CobraErrorCommand

type CobraErrorCommand func(cmd *cobra.Command, args []string) error

type Config

type Config struct {
	PackageCachePaths  []string
	RegistryCachePaths []string
	PackageInstallPath *string
	SDKVersion         *version.Version

	// The following entries must be `nil` if they are not set in the
	// configuration.
	// Note that viper changes empty lists to `nil` so it's important to
	// check for that case.
	RegistryConfigs tpkg.RegistryConfigs
}

type ConfigStore

type ConfigStore interface {
	Load(ctx context.Context) (*Config, error)
	Store(ctx context.Context, cfg *Config) error
}

type Registries

type Registries tpkg.Registries

type Run

type WithExitCode

type WithExitCode interface {
	ExitCode() int
}

type WithSilent

type WithSilent interface {
	Silent() bool
}

Jump to

Keyboard shortcuts

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