Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(channels []*structureSpec.Messaging)
Example ¶
package main
import (
structureSpec "github.com/taubyte/go-specs/structure"
messagingTable "github.com/taubyte/tau-cli/table/messaging"
)
func main() {
channels := []*structureSpec.Messaging{
{
Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
Name: "someMessaging1",
Match: "/test/v1",
},
{
Id: "QmbUIDhRosp5BaXDASEWSCtpkQCgQCPdRVhnxjiSHfXdC0",
Name: "someMessaging2",
Match: "/test/v2",
},
}
messagingTable.List(channels)
}
Output: ┌─────────────────┬────────────────┬──────────┐ │ ID │ NAME │ MATCH │ ├─────────────────┼────────────────┼──────────┤ │ QmbAA8...HfXdWH │ someMessaging1 │ /test/v1 │ ├─────────────────┼────────────────┼──────────┤ │ QmbUID...HfXdC0 │ someMessaging2 │ /test/v2 │ └─────────────────┴────────────────┴──────────┘
func Query ¶
func Query(messaging *structureSpec.Messaging)
Example ¶
package main
import (
structureSpec "github.com/taubyte/go-specs/structure"
messagingTable "github.com/taubyte/tau-cli/table/messaging"
)
func main() {
messaging := &structureSpec.Messaging{
Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
Name: "someProject",
Description: "this is a messaging of some type",
Tags: []string{"apple", "orange", "banana"},
Match: "/test/v1",
MQTT: true,
}
messagingTable.Query(messaging)
}
Output: ┌───────────────┬────────────────────────────────────────────────┐ │ ID │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │ ├───────────────┼────────────────────────────────────────────────┤ │ Name │ someProject │ ├───────────────┼────────────────────────────────────────────────┤ │ Description │ this is a messaging of some type │ ├───────────────┼────────────────────────────────────────────────┤ │ Tags │ apple, orange, banana │ ├───────────────┼────────────────────────────────────────────────┤ │ Local │ false │ ├───────────────┼────────────────────────────────────────────────┤ │ Channel │ │ ├───────────────┼────────────────────────────────────────────────┤ │ - Match │ /test/v1 │ ├───────────────┼────────────────────────────────────────────────┤ │ - Use Regex │ false │ ├───────────────┼────────────────────────────────────────────────┤ │ Bridges │ │ ├───────────────┼────────────────────────────────────────────────┤ │ - MQTT │ true │ ├───────────────┼────────────────────────────────────────────────┤ │ - WebSocket │ false │ └───────────────┴────────────────────────────────────────────────┘
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.