Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(services []*structureSpec.Service)
Example ¶
package main
import (
structureSpec "github.com/taubyte/go-specs/structure"
serviceTable "github.com/taubyte/tau-cli/table/service"
)
func main() {
services := []*structureSpec.Service{
{
Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
Name: "someService1",
Protocol: "/test/v1",
},
{
Id: "QmbUIDhRosp5BaXDASEWSCtpkQCgQCPdRVhnxjiSHfXdC0",
Name: "someService2",
Protocol: "/test/v2",
},
}
serviceTable.List(services)
}
Output: ┌─────────────────┬──────────────┬──────────┐ │ ID │ NAME │ PROTOCOL │ ├─────────────────┼──────────────┼──────────┤ │ QmbAA8...HfXdWH │ someService1 │ /test/v1 │ ├─────────────────┼──────────────┼──────────┤ │ QmbUID...HfXdC0 │ someService2 │ /test/v2 │ └─────────────────┴──────────────┴──────────┘
func Query ¶
func Query(service *structureSpec.Service)
Example ¶
package main
import (
structureSpec "github.com/taubyte/go-specs/structure"
serviceTable "github.com/taubyte/tau-cli/table/service"
)
func main() {
service := &structureSpec.Service{
Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
Name: "someProject",
Description: "this is a service of some type",
Tags: []string{"apple", "orange", "banana"},
Protocol: "/test/v1",
}
serviceTable.Query(service)
}
Output: ┌─────────────┬────────────────────────────────────────────────┐ │ ID │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │ ├─────────────┼────────────────────────────────────────────────┤ │ Name │ someProject │ ├─────────────┼────────────────────────────────────────────────┤ │ Description │ this is a service of some type │ ├─────────────┼────────────────────────────────────────────────┤ │ Tags │ apple, orange, banana │ ├─────────────┼────────────────────────────────────────────────┤ │ Protocol │ /test/v1 │ └─────────────┴────────────────────────────────────────────────┘
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.