From 384bd0444fc166925bdfccf921ff7bddaee34552 Mon Sep 17 00:00:00 2001 From: Benjamin Bollen <ben@erisindustries.com> Date: Fri, 22 Jul 2016 17:20:03 +0200 Subject: [PATCH] client: start cmd eris-client --- client/cmd/eris-client.go | 48 ++++++++++++++++++++++++++++++++++ client/cmd/eris-client/main.go | 25 ++++++++++++++++++ client/cmd/transaction.go | 25 ++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 client/cmd/eris-client.go create mode 100644 client/cmd/eris-client/main.go create mode 100644 client/cmd/transaction.go diff --git a/client/cmd/eris-client.go b/client/cmd/eris-client.go new file mode 100644 index 00000000..c7f67471 --- /dev/null +++ b/client/cmd/eris-client.go @@ -0,0 +1,48 @@ +// Copyright 2015, 2016 Eris Industries (UK) Ltd. +// This file is part of Eris-RT + +// Eris-RT is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Eris-RT is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Eris-RT. If not, see <http://www.gnu.org/licenses/>. + +package commands + +import ( +) + +// Global Do struct +var do *definitions.Do + +var ErisClientCmd = &cobra.Command{ + Use: "eris-client", + Short: "Eris-client interacts with a running Eris chain.", + Long: `Eris-client interacts with a running Eris chain. + +Made with <3 by Eris Industries. + +Complete documentation is available at https://docs.erisindustries.com +` + "\nVERSION:\n " + version.VERSION, + PersistentPreRun: func(cmd *cobra.Command, args []string) { + + log.SetLevel(log.WarnLevel) + if do.Verbose { + log.SetLevel(log.InfoLevel) + } else if do.Debug { + log.SetLevel(log.DebugLevel) + } + }, + Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, +} + +func Execute() { + +} \ No newline at end of file diff --git a/client/cmd/eris-client/main.go b/client/cmd/eris-client/main.go new file mode 100644 index 00000000..8219af99 --- /dev/null +++ b/client/cmd/eris-client/main.go @@ -0,0 +1,25 @@ +// Copyright 2015, 2016 Eris Industries (UK) Ltd. +// This file is part of Eris-RT + +// Eris-RT is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Eris-RT is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Eris-RT. If not, see <http://www.gnu.org/licenses/>. + +package main + +import ( + commands "github.com/eris-ltd/eris-db/client/cmd" +) + +func main() { + commands.Execute() +} diff --git a/client/cmd/transaction.go b/client/cmd/transaction.go new file mode 100644 index 00000000..b328e129 --- /dev/null +++ b/client/cmd/transaction.go @@ -0,0 +1,25 @@ +// Copyright 2015, 2016 Eris Industries (UK) Ltd. +// This file is part of Eris-RT + +// Eris-RT is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Eris-RT is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Eris-RT. If not, see <http://www.gnu.org/licenses/>. + +package commands + +import ( + commands "github.com/eris-ltd/eris-db/cmd" +) + +func main() { + commands.Execute() +} -- GitLab