Commit from GitHub Actions (Generate Clients & Examples)

This commit is contained in:
asim
2021-11-03 14:46:11 +00:00
parent 8827af19f5
commit 4234070dd0
12 changed files with 162 additions and 25 deletions

View File

@@ -0,0 +1,17 @@
package example
import (
"fmt"
"os"
"github.com/micro/services/clients/go/stream"
)
// List messages for a given channel
func ListMessages() {
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := streamService.ListMessages(&stream.ListMessagesRequest{
Channel: "general",
})
fmt.Println(rsp, err)
}