Skip to content

Commit ce942cd

Browse files
committed
bringyourctl: add proxy command
1 parent 358a236 commit ce942cd

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

bringyourctl/main.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Usage:
7272
bringyourctl product-updates sync
7373
bringyourctl query location <query>
7474
bringyourctl upgrade-plan --network_id=<network_id>
75+
bringyourctl proxy parse-id <signed_proxy_id>
7576
7677
Options:
7778
-h --help Show this screen.
@@ -228,6 +229,10 @@ Options:
228229
searchQuery(opts)
229230
} else if upgradePlan_, _ := opts.Bool("upgrade-plan"); upgradePlan_ {
230231
upgradePlan(opts)
232+
} else if proxy, _ := opts.Bool("proxy"); proxy {
233+
if parseId, _ := opts.Bool("parse-id"); parseId {
234+
proxyParseId(opts)
235+
}
231236
} else {
232237
fmt.Println(usage)
233238
}
@@ -1082,3 +1087,15 @@ func upgradePlan(opts docopt.Opts) {
10821087

10831088
controller.AddRefreshTransferBalance(ctx, networkId)
10841089
}
1090+
1091+
func proxyParseId(opts docopt.Opts) {
1092+
signedProxyId, _ := opts.String("<signed_proxy_id>")
1093+
1094+
proxyId, err := model.ParseSignedProxyId(signedProxyId)
1095+
1096+
if err != nil {
1097+
panic(err)
1098+
}
1099+
1100+
fmt.Printf("%s\n", proxyId)
1101+
}

0 commit comments

Comments
 (0)