firestore/examples/end2end/src/userutil/drawindex.go
raw| 1 | package userutil |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | admin "go-genproto/googleapis/firestore/admin/v1beta1" |
| 6 | ) |
| 7 | |
| 8 | //DrawIndex ... Draw a single index instance |
| 9 | func DrawIndex(ind admin.Index) { |
| 10 | |
| 11 | fmt.Println("Index Name: " + ind.Name + "\nIndex State: " + ind.State.String()) |
| 12 | for _, indFields := range ind.Fields { |
| 13 | fmt.Println(" Field: " + indFields.FieldPath + " Mode: " + indFields.Mode.String()) |
| 14 | |
| 15 | } |
| 16 | fmt.Print("\n") |
| 17 | |
| 18 | } |