Commit from GitHub Actions (Generate Clients & Examples)

This commit is contained in:
crufter
2021-11-08 15:53:57 +00:00
parent 910c0b51ce
commit b03c59cffc
6 changed files with 7 additions and 4 deletions

View File

@@ -12,9 +12,9 @@ func PublishAnEvent() {
eventService := event.NewEventService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := eventService.Publish(&event.PublishRequest{
Message: map[string]interface{}{
"user": "john",
"id": "1",
"type": "signup",
"user": "john",
},
Topic: "user",
})

View File

@@ -2,5 +2,6 @@ curl "http://localhost:8080/helloworld/Stream" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"messages": 10,
"name": "John"
}'

View File

@@ -11,7 +11,8 @@ import (
func StreamsResponsesFromTheServerUsingWebsockets() {
helloworldService := helloworld.NewHelloworldService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := helloworldService.Stream(&helloworld.StreamRequest{
Name: "John",
Messages: 10,
Name: "John",
})
fmt.Println(rsp, err)
}

View File

@@ -4,6 +4,7 @@ const { HelloworldService } = require("m3o/helloworld");
async function streamsResponsesFromTheServerUsingWebsockets() {
let helloworldService = new HelloworldService(process.env.MICRO_API_TOKEN);
let rsp = await helloworldService.stream({
messages: 10,
name: "John",
});
console.log(rsp);

View File

@@ -12,9 +12,9 @@ func PublishAmessage() {
mqService := mq.NewMqService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := mqService.Publish(&mq.PublishRequest{
Message: map[string]interface{}{
"id": "1",
"type": "signup",
"user": "john",
"id": "1",
},
Topic: "events",
})