cmd

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2014 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package cmd implements console commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal added in v0.5.1

func Fatal(err error)

Fatal panics and aborts execution with exit code 1

func InitContext

func InitContext(flags *flag.FlagSet) error

InitContext initializes context with default settings

func ListPackagesRefList

func ListPackagesRefList(reflist *deb.PackageRefList) (err error)

ListPackagesRefList shows list of packages in PackageRefList

func RootCommand

func RootCommand() *commander.Command

RootCommand creates root command in command tree

func ShutdownContext

func ShutdownContext()

ShutdownContext shuts context down

Types

type AptlyContext added in v0.5.1

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

AptlyContext is a common context shared by all commands

func (*AptlyContext) ArchitecturesList added in v0.5.1

func (context *AptlyContext) ArchitecturesList() []string

ArchitecturesList returns list of architectures fixed via command line or config

func (*AptlyContext) CollectionFactory added in v0.5.1

func (context *AptlyContext) CollectionFactory() *deb.CollectionFactory

CollectionFactory builds factory producing all kinds of collections

func (*AptlyContext) Config added in v0.5.1

func (context *AptlyContext) Config() *utils.ConfigStructure

Config loads and returns current configuration

func (*AptlyContext) DBPath added in v0.5.1

func (context *AptlyContext) DBPath() string

DBPath builds path to database

func (*AptlyContext) Database added in v0.5.1

func (context *AptlyContext) Database() (database.Storage, error)

Database opens and returns current instance of database

func (*AptlyContext) DependencyOptions added in v0.5.1

func (context *AptlyContext) DependencyOptions() int

DependencyOptions calculates options related to dependecy handling

func (*AptlyContext) Downloader added in v0.5.1

func (context *AptlyContext) Downloader() aptly.Downloader

Downloader returns instance of current downloader

func (*AptlyContext) PackagePool added in v0.5.1

func (context *AptlyContext) PackagePool() aptly.PackagePool

PackagePool returns instance of PackagePool

func (*AptlyContext) Progress added in v0.5.1

func (context *AptlyContext) Progress() aptly.Progress

Progress creates or returns Progress object

func (*AptlyContext) PublishedStorage added in v0.5.1

func (context *AptlyContext) PublishedStorage() aptly.PublishedStorage

PublishedStorage returns instance of PublishedStorage

type FatalError added in v0.5.1

type FatalError struct {
	ReturnCode int
	Message    string
}

FatalError is type for panicking to abort execution with non-zero exit code and print meaningful explanation

Jump to

Keyboard shortcuts

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