-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Co-authored-by: zakir <80246097+zakir-code@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
- Loading branch information
1 parent
1e3b81f
commit 60dc259
Showing
5 changed files
with
64 additions
and
3 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
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,43 @@ | ||
package node | ||
|
||
import ( | ||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" | ||
nodev1beta1 "cosmossdk.io/api/cosmos/base/node/v1beta1" | ||
) | ||
|
||
var ServiceAutoCLIDescriptor = &autocliv1.ServiceCommandDescriptor{ | ||
Service: nodev1beta1.Service_ServiceDesc.ServiceName, | ||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{ | ||
{ | ||
RpcMethod: "Config", | ||
Use: "config", | ||
Short: "Query the current node config", | ||
}, | ||
{ | ||
RpcMethod: "Status", | ||
Use: "status", | ||
Short: "Query the current node status", | ||
}, | ||
}, | ||
} | ||
|
||
// NewNodeCommands is a fake `appmodule.Module` to be considered as a module | ||
// and be added in AutoCLI. | ||
func NewNodeCommands() *nodeModule { | ||
return &nodeModule{} | ||
} | ||
|
||
type nodeModule struct{} | ||
|
||
func (m nodeModule) IsOnePerModuleType() {} | ||
func (m nodeModule) IsAppModule() {} | ||
|
||
func (m nodeModule) Name() string { | ||
return "node" | ||
} | ||
|
||
func (m nodeModule) AutoCLIOptions() *autocliv1.ModuleOptions { | ||
return &autocliv1.ModuleOptions{ | ||
Query: ServiceAutoCLIDescriptor, | ||
} | ||
} |
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
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