Documentation
¶
Index ¶
- Constants
- Variables
- func AddCommands()
- func AddGlobalFlags()
- func ArgCheck(num int, comp string, cmd *cobra.Command, args []string) error
- func CatChain(cmd *cobra.Command, args []string)
- func CatService(cmd *cobra.Command, args []string)
- func CheckoutChain(cmd *cobra.Command, args []string)
- func CleanItUp(cmd *cobra.Command, args []string)
- func ContractsDeploy(cmd *cobra.Command, args []string)
- func ContractsExport(cmd *cobra.Command, args []string)
- func ContractsImport(cmd *cobra.Command, args []string)
- func ContractsTest(cmd *cobra.Command, args []string)
- func ConvertKey(cmd *cobra.Command, args []string)
- func CurrentChain(cmd *cobra.Command, args []string)
- func DisplayManPage(in *bytes.Buffer)
- func DisplayVersion(cmd *cobra.Command, args []string)
- func DoAction(cmd *cobra.Command, args []string)
- func EditAction(cmd *cobra.Command, args []string)
- func EditChain(cmd *cobra.Command, args []string)
- func EditService(cmd *cobra.Command, args []string)
- func ExecChain(cmd *cobra.Command, args []string)
- func ExecData(cmd *cobra.Command, args []string)
- func ExecService(cmd *cobra.Command, args []string)
- func Execute()
- func ExportAction(cmd *cobra.Command, args []string)
- func ExportChain(cmd *cobra.Command, args []string)
- func ExportData(cmd *cobra.Command, args []string)
- func ExportKey(cmd *cobra.Command, args []string)
- func ExportService(cmd *cobra.Command, args []string)
- func FilesCat(cmd *cobra.Command, args []string)
- func FilesGet(cmd *cobra.Command, args []string)
- func FilesList(cmd *cobra.Command, args []string)
- func FilesManageCached(cmd *cobra.Command, args []string)
- func FilesPin(cmd *cobra.Command, args []string)
- func FilesPut(cmd *cobra.Command, args []string)
- func FlagCheck(num int, comp string, cmd *cobra.Command, flags []string) error
- func GenerateKey(cmd *cobra.Command, args []string)
- func GenerateManPage(man *bytes.Buffer)
- func GetPubKey(cmd *cobra.Command, args []string)
- func GraduateChain(cmd *cobra.Command, args []string)
- func ImportAction(cmd *cobra.Command, args []string)
- func ImportChain(cmd *cobra.Command, args []string)
- func ImportData(cmd *cobra.Command, args []string)
- func ImportKey(cmd *cobra.Command, args []string)
- func ImportService(cmd *cobra.Command, args []string)
- func InitializeConfig()
- func InspectChain(cmd *cobra.Command, args []string)
- func InspectData(cmd *cobra.Command, args []string)
- func InspectService(cmd *cobra.Command, args []string)
- func InstallChain(cmd *cobra.Command, args []string)
- func KillChain(cmd *cobra.Command, args []string)
- func KillService(cmd *cobra.Command, args []string)
- func ListActions(cmd *cobra.Command, args []string)
- func ListAllChains(cmd *cobra.Command, args []string)
- func ListAllServices(cmd *cobra.Command, args []string)
- func ListAllTheThings()
- func ListKnownData(cmd *cobra.Command, args []string)
- func LogChain(cmd *cobra.Command, args []string)
- func LogService(cmd *cobra.Command, args []string)
- func MakeGenesisFile(cmd *cobra.Command, args []string)
- func NewAction(cmd *cobra.Command, args []string)
- func NewChain(cmd *cobra.Command, args []string)
- func NewService(cmd *cobra.Command, args []string)
- func PlopChain(cmd *cobra.Command, args []string)
- func PortsChain(cmd *cobra.Command, args []string)
- func PortsService(cmd *cobra.Command, args []string)
- func RegisterChain(cmd *cobra.Command, args []string)
- func RenameAction(cmd *cobra.Command, args []string)
- func RenameChain(cmd *cobra.Command, args []string)
- func RenameData(cmd *cobra.Command, args []string)
- func RenameService(cmd *cobra.Command, args []string)
- func RmAction(cmd *cobra.Command, args []string)
- func RmChain(cmd *cobra.Command, args []string)
- func RmData(cmd *cobra.Command, args []string)
- func RmService(cmd *cobra.Command, args []string)
- func Router(cmd *cobra.Command, args []string)
- func StartChain(cmd *cobra.Command, args []string)
- func StartService(cmd *cobra.Command, args []string)
- func UpdateChain(cmd *cobra.Command, args []string)
- func UpdateService(cmd *cobra.Command, args []string)
- func UpdateTool(cmd *cobra.Command, args []string)
Constants ¶
const VERSION = version.VERSION
Variables ¶
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
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 ...] commands are built to help you build blockchains. It is our opinionated gateway to the wonderful world of permissioned smart contract networks. Your own blockchain/smart contract machine is just an [eris chains new] away!`, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
Primary Chains Sub-Command
var Clean = &cobra.Command{ Use: "clean", Short: "Clean up your eris working environment.", Long: `Stops and force removes all eris containers (chains, services, datas, etc) by default. Useful for development.`, Run: func(cmd *cobra.Command, args []string) { CleanItUp(cmd, args) }, }
TODO better explanations of command
var Config = &cobra.Command{ Use: "config", Short: "Manage configuration settings.", Long: `Display and manage configuration settings for various components of the Eris platform and for the platform itself. The [eris config] command 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] command.`, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
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
var Cum []int
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. The [eris data import] and [eris data export] commands should be thought of from the point of view of the container. The [eris data import] command sends files *as is* from ~/.eris/data/NAME on the host to ~/.eris/ inside of the data container. The [eris data export] command 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
var ErisCmd = &cobra.Command{ Use: "eris COMMAND [FLAG ...]", 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) dockerVersion, _ := util.DockerClientVersion() marmot := "Come back after you have upgraded and the marmots will be happy to service your blockchain management needs" if dockerVersion < dVerMin { IfExit(fmt.Errorf("Eris requires docker version >= %v\nThe marmots have detected docker version: %v\n%s", dVerMin, dockerVersion, marmot)) } }, 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
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
var Help = &cobra.Command{ Use: "help COMMAND", Short: "Help about a command", Long: `Provide help for any command in the application. Type eris help COMMAND for full details.`, PersistentPreRun: func(cmd *cobra.Command, args []string) {}, PersistentPostRun: func(cmd *cobra.Command, args []string) {}, Run: func(c *cobra.Command, args []string) { cmd, _, e := c.Root().Find(args) if cmd == nil || e != nil { c.Printf("Unknown help topic %#q.", args) c.Root().Usage() } else { helpFunc := cmd.HelpFunc() helpFunc(cmd, args) } }, }
var Init = &cobra.Command{ Use: "init", Short: "Initialize your work space for smart contract glory.", 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
var Keys = &cobra.Command{ Use: "keys", Short: "Do specific tasks with keys *for dev only*.", Long: `The keys subcommand is an opiniated wrapper around eris-keys and requires a keys container to be running. It is for development only. Advanced functionality is available via the [eris services exec keys "eris-keys CMD"] command. See https://docs.erisindustries.com/documentation/eris-keys/ for more info.`, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
var ListEverything = &cobra.Command{ Use: "ls", Short: "List all the things eris knows about.", Long: `List all known definition files for services and chains. Also lists all existing and running services and chains and, data containers. For more detailed output, use [eris services ls], [eris chains ls], and [eris data ls] commands with respective flags (--known, --existing, --running).`, Run: func(cmd *cobra.Command, args []string) { ListAllTheThings() }, }
var ManPage = &cobra.Command{ Use: "man", Short: "Display a man page.", Long: `Display the Eris man page.`, Run: func(cmd *cobra.Command, args []string) { man := new(bytes.Buffer) GenerateManPage(man) DisplayManPage(man) }, }
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
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() }, }
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
var Update = &cobra.Command{ Use: "update", Short: "Update the eris tool.", Long: `Fetch the latest version (master branch by default) and re-install eris; requires git and go to be installed.`, Run: func(cmd *cobra.Command, args []string) { UpdateTool(cmd, args) }, }
var VerSion = &cobra.Command{ Use: "version", Short: "Display Eris's Platform Version.", Long: `Display the current installed version of Eris.`, Run: DisplayVersion, }
Functions ¶
func AddGlobalFlags ¶
func AddGlobalFlags()
Flags that are to be used by commands are handled by the Do struct Define the persistent commands (globals)
func CatService ¶
func ContractsDeploy ¶
func ContractsExport ¶
func ContractsImport ¶
func ContractsTest ¶
func ConvertKey ¶
func CurrentChain ¶
func DisplayManPage ¶
DisplayManPage runs the groff(1) formatter on a buffer and then starts a pager to display the result.
func DisplayVersion ¶
func EditAction ¶
func EditService ¶
func ExecService ¶ added in v0.10.2
func ExportAction ¶
func ExportChain ¶
func ExportData ¶
func ExportService ¶
func FilesManageCached ¶ added in v0.10.2
func GenerateKey ¶
func GenerateManPage ¶
GenerateManPages uses the Cobra commands' info to construct a man page. It fills in the man buffer with the groff(1) markup code.
func GraduateChain ¶
func ImportAction ¶
func ImportChain ¶
import a chain definition file
func ImportData ¶
func InitializeConfig ¶
func InitializeConfig()
func InspectChain ¶
func InspectData ¶
func InspectService ¶
func InstallChain ¶
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 KillService ¶
func ListActions ¶
func ListAllChains ¶
func ListAllServices ¶
func ListAllTheThings ¶
func ListAllTheThings()
func ListKnownData ¶
----------------------------------------------------
func LogService ¶
func MakeGenesisFile ¶
func NewChain ¶
create a new chain
genesis is either given or a simple single-validator genesis will be laid for you
func NewService ¶
func PortsChain ¶ added in v0.10.2
func PortsService ¶ added in v0.10.2
func RegisterChain ¶ added in v0.10.3
register a chain in the etcb chain registry
func RenameAction ¶
func RenameChain ¶
func RenameData ¶
func RenameService ¶
func StartChain ¶
func StartService ¶
func UpdateChain ¶
func UpdateService ¶
Updates an installed service, or installs it if it has not been installed.
func UpdateTool ¶
Types ¶
This section is empty.