| 1 |
package gfx |
| 2 |
|
| 3 |
import ( |
| 4 |
"fmt" |
| 5 |
"os" |
| 6 |
"userutil" |
| 7 |
) |
| 8 |
|
| 9 |
// DrawMenu ... Draw the system menu |
| 10 |
func DrawMenu() { |
| 11 |
|
| 12 |
fmt.Println("\n Google Firestore RPC Menu\n") |
| 13 |
fmt.Println("1|batchgetdocuments ......... BatchGetDocuments") |
| 14 |
fmt.Println("2|begintransaction ......... BeginTransaction") |
| 15 |
fmt.Println("3|commit .................... Commit") |
| 16 |
fmt.Println("4|createdocument ............ CreateDocument") |
| 17 |
fmt.Println("5|deletedocument ............ DeleteDocument") |
| 18 |
fmt.Println("6|getdocument ............... GetDocument") |
| 19 |
fmt.Println("7|listcollectionids ......... ListCollectionIds") |
| 20 |
fmt.Println("8|listdocuments ............. ListDocuments") |
| 21 |
fmt.Println("9|rollback .................. Rollback") |
| 22 |
fmt.Println("10|runquery ................. RunQuery") |
| 23 |
fmt.Println("11|updatedocument ........... UpdateDocument") |
| 24 |
fmt.Println("12|write .................... Write") |
| 25 |
fmt.Println("\n Firestore Admin RPC's \n") |
| 26 |
fmt.Println("13|createindex .............. CreateIndex") |
| 27 |
fmt.Println("14|deleteindex .............. DeleteIndex") |
| 28 |
fmt.Println("15|getindex ................. GetIndex") |
| 29 |
fmt.Println("16|listindexes .............. ListIndex") |
| 30 |
fmt.Print("\n\nEnter an option ('quit' to exit): ") |
| 31 |
|
| 32 |
text := userutil.ReadFromConsole() |
| 33 |
|
| 34 |
if text == "quit" { |
| 35 |
os.Exit(0) |
| 36 |
} else { |
| 37 |
ChooseAPIMethod(text) |
| 38 |
} |
| 39 |
} |