[#390] cli: Support more tree service API calls in CLI
* Support healthcheck API call * Support move API call * Support remove API call * Support getSubtree API call * Support getOpLog API call Signed-off-by: Airat Arifullin a.arifullin@yadro.com
This commit is contained in:
parent
a65e26878b
commit
c42db4e761
8 changed files with 430 additions and 6 deletions
|
@ -60,7 +60,11 @@ func getByPath(cmd *cobra.Command, _ []string) {
|
|||
|
||||
latestOnly, _ := cmd.Flags().GetBool(latestOnlyFlagKey)
|
||||
path, _ := cmd.Flags().GetString(pathFlagKey)
|
||||
// pAttr, _ := cmd.Flags().GetString(pathAttributeFlagKey)
|
||||
|
||||
var bt []byte
|
||||
if t := common.ReadBearerToken(cmd, bearerFlagKey); t != nil {
|
||||
bt = t.Marshal()
|
||||
}
|
||||
|
||||
req := new(tree.GetNodeByPathRequest)
|
||||
req.Body = &tree.GetNodeByPathRequest_Body{
|
||||
|
@ -71,9 +75,7 @@ func getByPath(cmd *cobra.Command, _ []string) {
|
|||
Path: strings.Split(path, "/"),
|
||||
LatestOnly: latestOnly,
|
||||
AllAttributes: true,
|
||||
}
|
||||
if btok := common.ReadBearerToken(cmd, bearerFlagKey); btok != nil {
|
||||
req.Body.BearerToken = btok.Marshal()
|
||||
BearerToken: bt,
|
||||
}
|
||||
|
||||
commonCmd.ExitOnErr(cmd, "message signing: %w", tree.SignMessage(req, pk))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue