commands

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2015 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = version.VERSION

Variables

View Source
var Actions = &cobra.Command{
	Use:   "actions",
	Short: "Manage and Perform Structured Actions.",
	Long: `Display and Manage actions for various components of the
Eris platform and for the platform itself.

Actions are bundles of commands which rely upon a project
which is currently in scope or on a global set of actions.
Actions are held in yaml, toml, or json action-definition
files within the action folder in the eris tree (globally
scoped actions) or in a directory pointed to by the
actions field of the currently checked out project
(project scoped actions). Actions are a sequence of
commands which operate in a similar fashion to how a
circle.yml file or a .travis.yml script field may operate.

Actions execute in a series of individual sub-shells ran
on the host. Note actions do not run from inside containers
but can interact with containers either via the installed
eris commands or via the docker cli itself or, indeed, any
other programs installed *on the host*.`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}

Primary Actions Sub-Command flags to add: --global --project

View Source
var Chains = &cobra.Command{
	Use:   "chains",
	Short: "Start, Stop, and Manage Blockchains.",
	Long: `Start, Stop, and Manage Blockchains.

The chains subcommand is used to work on erisdb smart contract
blockchain networks. The name is not perfect, as eris is able
to operate a wide variety of blockchains out of the box. Most
of those existing blockchains should be ran via the

eris services ...

commands. As they fall under the rubric of "things I just want
to turn on or off". While you can develop against those
blockchains, you generally aren't developing those blockchains
themselves.

Eris chains is built to help you build blockchains. It is our
opinionated gateway to the wonderful world of permissioned
smart contract networks.

Your own baby blockchain/smart contract machine is just an

eris chains new

away!`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}

Primary Chains Sub-Command

View Source
var Config = &cobra.Command{
	Use:   "config",
	Short: "Manage Configuration Settings for Eris.",
	Long: `Display and Manage configuration settings for various components of the
Eris platform and for the platform itself.

NOTE: [eris config] is only for configuring the Eris platform
it will not work to configure any of the blockchains, services
or projects which are managed by the Eris platform. To configure
blockchains use [eris chains config]; to configure services
use [eris services config]; to configure projects use
[eris projects config].`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}
View Source
var Contracts = &cobra.Command{
	Use:   "contracts",
	Short: "Deploy, Test, and Manage Your Smart Contracts.",
	Long: `The contracts subcommand is used to test and deploy
smart contracts for use by your application.`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}

Primary Contracts Sub-Command

View Source
var Cum []int
View Source
var Data = &cobra.Command{
	Use:   "data",
	Short: "Manage Data Containers for your Application.",
	Long: `The data subcommand is used to import, and export
data into containers for use by your application.

eris data import and eris data export should be thought of from
the point of view of the container.

eris data import sends files *as is* from ~/.eris/data/NAME on
the host to ~/.eris/ inside of the data container.

eris data export performs this process in the reverse. It sucks
out whatever is in the volumes of the data container and sticks
it back into ~/.eris/data/NAME on the host.

At eris, we use this functionality to formulate little jsons
and configs on the host and then "stick them back into the
containers"
`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}

Primary Data Sub-Command

View Source
var ErisCmd = &cobra.Command{
	Use:   "eris [command] [flags]",
	Short: "The Blockchain Application Platform",
	Long: `Eris is a platform for building, testing, maintaining, and operating
distributed applications with a blockchain backend. Eris makes it easy
and simple to wrangle the dragons of smart contract blockchains.

Made with <3 by Eris Industries.

Complete documentation is available at https://docs.erisindustries.com
` + "\nVersion:\n  " + VERSION,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		var logLevel log.LogLevel
		if do.Verbose {
			logLevel = 2
		} else if do.Debug {
			logLevel = 3
		}
		log.SetLoggers(logLevel, config.GlobalConfig.Writer, config.GlobalConfig.ErrorWriter)

		ipfs.IpfsHost = config.GlobalConfig.Config.IpfsHost

		util.DockerConnect(do.Verbose, do.MachineName)
	},
	PersistentPostRun: func(cmd *cobra.Command, args []string) {
		err := config.SaveGlobalConfig(config.GlobalConfig.Config)
		if err != nil {
			logger.Errorln(err)
		}
		log.Flush()
	},
}

Defining the root command

View Source
var Files = &cobra.Command{
	Use:   "files",
	Short: "Manage Files Needed for Your Application Using IPFS.",
	Long: `The files subcommand is used to import, and export
files to and from IPFS for use on the host machine.

These commands are provided in addition to the various
functionality which is included throughout the tool, such as
services import or services export which operate more
precisely. The eris files command is used as a general wrapper
around an IPFS gateway which would be running as eris services ipfs.

At times, due to the manner in which IPFS boots files commands
will fail. If you get errors when running eris files commands
then please run [eris services start ipfs] give that a second
or two to boot and then retry the eris files command which failed.`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}

Primary Files Sub-Command Flags to add: ipfsHost

View Source
var Init = &cobra.Command{
	Use:     "init",
	Aliases: []string{"update"},
	Short:   "Initialize the ~/.eris directory with default files or update to latest version",
	Long: `Create the ~/.eris directory with actions and services subfolders
and clone eris-ltd/eris-actions eris-ltd/eris-services into them, respectively.
`,
	Run: func(cmd *cobra.Command, args []string) {
		Router(cmd, args)
	},
}

flags to add: --no-clone

View Source
var ListExisting = &cobra.Command{
	Use:   "ls",
	Short: "List everything that is installed and built.",
	Long: `Lists the built services and chains known to Eris.

To list the known services: [eris services known]. This will show
all services which exist in the form of locally held service
definition files.

To list the running services: [eris services ps]. This is the service
which are currently running.

To start a service use: [eris services start serviceName].`,
	Run: func(cmd *cobra.Command, args []string) {
		ListAllExisting()
	},
}
View Source
var ListKnown = &cobra.Command{
	Use:   "known",
	Short: "List everything Eris knows about.",
	Long: `Lists all the services, chains, & data containers which Eris
has installed locally as definition files.

To install a new service, use: [eris services import].

To install a new chain, use: [eris chains import].

Services include all executable services supported by the Eris platform which are
NOT blockchains or key managers.

Blockchains are handled using the [eris chains] command.
`,
	Run: func(cmd *cobra.Command, args []string) {
		ListAllKnown()
	},
}
View Source
var Projects = &cobra.Command{
	Use:   "projects",
	Short: "Start, Stop, and Manage Projects or Applications.",
	Long: `Start, stop, and manage projects or applications.

Within the Eris platform, projects are a bundle of services,
and actions which are configured to run in a specific manner.
Projects may be defined either by a package.json file in the
root of an application's directory or via a docker-compose.yml
file in the root of an application's directory. Projects are
given a human readable name so that Eris can checkout and
operate the application or project.`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}

Primary Projects Sub-Command

View Source
var Remotes = &cobra.Command{
	Use:   "remotes",
	Short: "Manage and Perform Remote Machines and Services.",
	Long: `Display and Manage remote machines which are operating
various services reachable by the Eris platform.

Actions, if configured as such, can utilize remote machines.
To register and manage remote machines for sending of actions
to those machines, use this command.`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}
View Source
var Services = &cobra.Command{
	Use:   "services",
	Short: "Start, Stop, and Manage Services Required for your Application.",
	Long: `Start, Stop, and Manage Services Required for your Application.

Services are all services known and used by the Eris platform with the
exception of blockchain services.`,
	Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
}

Primary Services Sub-Command

View Source
var VerSion = &cobra.Command{
	Use:   "version",
	Short: "Display Eris's Platform Version.",
	Long:  `Display the current installed version of Eris.`,
	Run: func(cmd *cobra.Command, args []string) {
		logger.Println("Eris CLI Version: " + VERSION)
	},
}

Functions

func AddCommands

func AddCommands()

Define the commands

func AddGlobalFlags

func AddGlobalFlags()

Flags that are to be used by commands are handled by the Do struct Define the persistent commands (globals)

func ArgCheck

func ArgCheck(num int, comp string, cmd *cobra.Command, args []string) error

func CatChain

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

func CatService

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

func CheckoutChain

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

checkout a chain

func ContractsDeploy

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

func ContractsExport

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

func ContractsImport

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

func ContractsTest

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

func CurrentChain

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

func DoAction

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

func EditAction

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

func EditChain

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

edit a chain definition file

func EditService

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

func ExecChain added in v0.10.2

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

func ExecData

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

func ExecService added in v0.10.2

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

func Execute

func Execute()

func ExportAction

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

func ExportChain

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

func ExportData

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

func ExportService

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

func FilesCat added in v0.10.2

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

func FilesGet added in v0.10.2

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

func FilesList added in v0.10.2

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

func FilesManageCached added in v0.10.2

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

func FilesPin added in v0.10.2

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

func FilesPut added in v0.10.2

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

func GraduateChain

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

func ImportAction

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

func ImportChain

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

import a chain definition file

func ImportData

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

func ImportService

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

install

func InitializeConfig

func InitializeConfig()

func InspectChain

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

func InspectData

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

func InspectService

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

func InstallChain

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

fetch and install a chain

the idea here is you will either specify a chainName as the arg and that will double as the chainID, or you want a local reference name for the chain, so you specify the chainID with a flag and give your local reference name as the arg

func KillChain

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

func KillService

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

func ListActions

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

func ListAllExisting

func ListAllExisting()

TODO make output pretty

func ListAllKnown

func ListAllKnown()

func ListChains

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

func ListExistingServices

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

func ListKnownChains

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

func ListKnownData

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

----------------------------------------------------

func ListKnownServices

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

list known

func ListRunningChains

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

func ListRunningServices

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

func LogChain

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

func LogService

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

func NewAction

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

func NewChain

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

create a new chain

genesis is either given or a simple single-validator genesis will be laid for you

func NewService

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

func PlopChain added in v0.10.2

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

func PortsChain added in v0.10.2

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

func PortsService added in v0.10.2

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

func RegisterChain added in v0.10.3

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

register a chain in the etcb chain registry

func RenameAction

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

func RenameChain

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

func RenameData

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

func RenameService

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

func RmAction

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

func RmChain

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

func RmData

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

func RmService

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

func Router added in v0.10.2

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

func StartChain

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

func StartService

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

func UpdateChain

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

func UpdateService

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

Updates an installed service, or installs it if it has not been installed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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