github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/messaging/query_test.go (about) 1 package messagingTable_test 2 3 import ( 4 structureSpec "github.com/taubyte/go-specs/structure" 5 messagingTable "github.com/taubyte/tau-cli/table/messaging" 6 ) 7 8 func ExampleQuery() { 9 messaging := &structureSpec.Messaging{ 10 Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH", 11 Name: "someProject", 12 Description: "this is a messaging of some type", 13 Tags: []string{"apple", "orange", "banana"}, 14 Match: "/test/v1", 15 MQTT: true, 16 } 17 18 messagingTable.Query(messaging) 19 20 // Output: 21 // ┌───────────────┬────────────────────────────────────────────────┐ 22 // │ ID │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │ 23 // ├───────────────┼────────────────────────────────────────────────┤ 24 // │ Name │ someProject │ 25 // ├───────────────┼────────────────────────────────────────────────┤ 26 // │ Description │ this is a messaging of some type │ 27 // ├───────────────┼────────────────────────────────────────────────┤ 28 // │ Tags │ apple, orange, banana │ 29 // ├───────────────┼────────────────────────────────────────────────┤ 30 // │ Local │ false │ 31 // ├───────────────┼────────────────────────────────────────────────┤ 32 // │ Channel │ │ 33 // ├───────────────┼────────────────────────────────────────────────┤ 34 // │ - Match │ /test/v1 │ 35 // ├───────────────┼────────────────────────────────────────────────┤ 36 // │ - Use Regex │ false │ 37 // ├───────────────┼────────────────────────────────────────────────┤ 38 // │ Bridges │ │ 39 // ├───────────────┼────────────────────────────────────────────────┤ 40 // │ - MQTT │ true │ 41 // ├───────────────┼────────────────────────────────────────────────┤ 42 // │ - WebSocket │ false │ 43 // └───────────────┴────────────────────────────────────────────────┘ 44 }