github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/service/query_test.go (about) 1 package serviceTable_test 2 3 import ( 4 structureSpec "github.com/taubyte/go-specs/structure" 5 serviceTable "github.com/taubyte/tau-cli/table/service" 6 ) 7 8 func ExampleQuery() { 9 service := &structureSpec.Service{ 10 Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH", 11 Name: "someProject", 12 Description: "this is a service of some type", 13 Tags: []string{"apple", "orange", "banana"}, 14 Protocol: "/test/v1", 15 } 16 17 serviceTable.Query(service) 18 19 // Output: 20 // ┌─────────────┬────────────────────────────────────────────────┐ 21 // │ ID │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │ 22 // ├─────────────┼────────────────────────────────────────────────┤ 23 // │ Name │ someProject │ 24 // ├─────────────┼────────────────────────────────────────────────┤ 25 // │ Description │ this is a service of some type │ 26 // ├─────────────┼────────────────────────────────────────────────┤ 27 // │ Tags │ apple, orange, banana │ 28 // ├─────────────┼────────────────────────────────────────────────┤ 29 // │ Protocol │ /test/v1 │ 30 // └─────────────┴────────────────────────────────────────────────┘ 31 }