-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
7 changed files
with
713 additions
and
617 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ingest | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// IngestCmd ingest service commands | ||
var IngestCmd = &cobra.Command{ | ||
Use: "ingest", | ||
Short: "Ingest Service commands", | ||
Long: `The Ingest Service pulls data from a CometBFT full node and store the information in a database`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
cmd.Help() | ||
}, | ||
} | ||
|
||
func init() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package commands | ||
|
||
import ( | ||
ingest "github.com/cometbft/rpc-companion/commands/ingest" | ||
rpc "github.com/cometbft/rpc-companion/commands/rpc" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// RootCmd represents the base command when called without any subcommands | ||
var RootCmd = &cobra.Command{ | ||
Use: "rpc-companion", | ||
Short: "RPC Companion - CometBFT", | ||
Long: `RPC Companion is an implementation of a Data Companion for CometBFT based chains`, | ||
} | ||
|
||
// Execute adds all child commands to the root command and sets flags appropriately. | ||
// This is called by main.main(). It only needs to happen once to the rootCmd. | ||
func Execute() { | ||
cobra.CheckErr(RootCmd.Execute()) | ||
} | ||
|
||
func init() { | ||
|
||
options := cobra.CompletionOptions{ | ||
DisableDefaultCmd: true, | ||
DisableNoDescFlag: true, | ||
DisableDescriptions: false, | ||
} | ||
RootCmd.CompletionOptions = options | ||
|
||
cobra.EnableCommandSorting = true | ||
|
||
RootCmd.AddCommand(ingest.IngestCmd) | ||
RootCmd.AddCommand(rpc.RpcCmd) | ||
} | ||
|
||
func initConfig() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package rpc | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// RpcCmd RPC service commands | ||
var RpcCmd = &cobra.Command{ | ||
Use: "rpc", | ||
Short: "RPC Service commands", | ||
Long: `The RPC Service expose a RPC endpoint compatible with the CometBFT RPC endpoint.`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
cmd.Help() | ||
}, | ||
} | ||
|
||
func init() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.