Skip to content

Commit

Permalink
Added a little helper script which lists all the services with their …
Browse files Browse the repository at this point in the history
…FQPN (#46)

Co-authored-by: Noctunus <[email protected]>
  • Loading branch information
Noctunus and Noctunus authored Sep 25, 2024
1 parent 2808e84 commit 4971984
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/list_services.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# The following cut down the list of all the services defined by protobuf looking like this:
# cmp/services/activity/v2/search.proto:service ActivitySearchService
# cmp/services/activity/v2/list.proto:service ActivityProductListService
# cmp/services/activity/v2/info.proto:service ActivityProductInfoService
# cmp/services/network/v1/fee.proto:service GetNetworkFeeService

cd proto
while read service ; do
FN=$(echo $service | cut -d":" -f1)
SERVICE_NAME=$(echo $service | cut -d" " -f2)
SERVICE_PATH=$(dirname $FN | tr "/" ".")

echo "$SERVICE_PATH.$SERVICE_NAME"

done < <(grep -oP "^service \w+" -r *)

0 comments on commit 4971984

Please sign in to comment.