cmd

package
v0.0.0-...-2bbe97e Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorNoVersionFound will be thrown if there is no version that can be run
	ErrorNoVersionFound = errors.New("Could not find a version to run")
	// DefaultTimeout is the timeout used to pull an image
	DefaultTimeout = 300 * time.Second
)
View Source
var (
	// ErrorInvalidPath will be thrown if the given path is invalid
	ErrorInvalidPath = errors.New("Could not create given path, please make sure it exists and is a directory")
)
View Source
var (
	// ErrorNoRegistryGiven will be thrown if no registry is passed
	ErrorNoRegistryGiven = errors.New("No registry passed to the command")
)
View Source
var (
	// ErrorRegistryTypeNotSupported will be thrown if the registry type is not supported
	ErrorRegistryTypeNotSupported = errors.New("The type of the registry is not supported")
)
View Source
var (
	// ErrorToolNotFound will be thrown if a tool cannot be found
	ErrorToolNotFound = errors.New("Tool not found")
)

Functions

func CreateCommand

func CreateCommand(cfg *config.Config) *cobra.Command

func CreateMount

func CreateMount(cfg *config.Config, path string) error

CreateMount will create a new mount if possible

func CreateMountCommand

func CreateMountCommand(cfg *config.Config) *cobra.Command

func CreateRegistryCommand

func CreateRegistryCommand(cfg *config.Config) *cobra.Command

func CreateRootCommand

func CreateRootCommand(cfg *config.Config) *cobra.Command

CreateRootCommand will create the main command that should be used to run the application

func DeleteCommand

func DeleteCommand(cfg *config.Config) *cobra.Command

func DeleteMount

func DeleteMount(cfg *config.Config, path string) error

DeleteMount will list all mounts that are registered with Sledgehammer on this system

func DeleteMountCommand

func DeleteMountCommand(cfg *config.Config) *cobra.Command

func DeleteRegistry

func DeleteRegistry(cfg *config.Config, name string) error

DeleteRegistry will delete the given registry from Sledgehammer

func DeleteRegistryCommand

func DeleteRegistryCommand(cfg *config.Config) *cobra.Command

func DescribeCommand

func DescribeCommand(cfg *config.Config) *cobra.Command

func DescribeKit

func DescribeKit(cfg *config.Config, registryName string, kitName string) error

DescribeKit will describe detailed information about a kit

func DescribeKitCommand

func DescribeKitCommand(cfg *config.Config) *cobra.Command

func DescribeRegistry

func DescribeRegistry(cfg *config.Config, name string) error

DescribeRegistry will describe detailed information about a registry

func DescribeRegistryCommand

func DescribeRegistryCommand(cfg *config.Config) *cobra.Command

func DescribeTool

func DescribeTool(cfg *config.Config, name string) error

DescribeTool will describe detailed information about a tool

func DescribeToolCommand

func DescribeToolCommand(cfg *config.Config) *cobra.Command

func Execute

func Execute(cfg *config.Config)

Execute will execute the root command

func GetCommand

func GetCommand(cfg *config.Config) *cobra.Command

func GetKitCommand

func GetKitCommand(cfg *config.Config) *cobra.Command

func GetKits

func GetKits(cfg *config.Config) error

GetKits will get all kits that are registered with Sledgehammer on this system

func GetMountCommand

func GetMountCommand(cfg *config.Config) *cobra.Command

func GetMounts

func GetMounts(cfg *config.Config) error

GetMounts will get all mounts that are registered with Sledgehammer on this system

func GetRegistries

func GetRegistries(cfg *config.Config) error

GetRegistries will get all registries that are registered with Sledgehammer on this system

func GetRegistryCommand

func GetRegistryCommand(cfg *config.Config) *cobra.Command

func GetToolCommand

func GetToolCommand(cfg *config.Config) *cobra.Command

func GetTools

func GetTools(cfg *config.Config, search string) error

GetTools will get all tools that are registered with Sledgehammer on this system

func InstallCommand

func InstallCommand(cfg *config.Config) *cobra.Command

func ResetCommand

func ResetCommand(cfg *config.Config) *cobra.Command

func RunAlias

func RunAlias(cfg *config.Config, toolAlias string, arguments []string) error

RunAlias will run the given alias and passes all arguments to it

func RunAliasCommand

func RunAliasCommand(cfg *config.Config) *cobra.Command

func RunCommand

func RunCommand(cfg *config.Config) *cobra.Command

func UpdateCommand

func UpdateCommand(cfg *config.Config) *cobra.Command

Types

type RunCmd

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

func (*RunCmd) Execute

func (r *RunCmd) Execute(cfg *config.Config) error

Execute will run the given tool

func (*RunCmd) FetchRepositoryVersions

func (r *RunCmd) FetchRepositoryVersions(c chan func() (string, error), db *bolt.DB, to tool.Tool)

FetchRepositoryVersions will fetch the remote versions for the tool

Jump to

Keyboard shortcuts

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