mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 03:05:14 +00:00
Commit from GitHub Actions (Generate Clients & Examples)
This commit is contained in:
@@ -12,10 +12,10 @@ func CreateArecord() {
|
||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := dbService.Create(&db.CreateRequest{
|
||||
Record: map[string]interface{}{
|
||||
"id": "1",
|
||||
"name": "Jane",
|
||||
"age": 42,
|
||||
"isActive": true,
|
||||
"id": "1",
|
||||
"name": "Jane",
|
||||
},
|
||||
Table: "users",
|
||||
})
|
||||
|
||||
@@ -12,9 +12,9 @@ func PublishAmessage() {
|
||||
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",
|
||||
})
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/micro/services/clients/go/mq"
|
||||
)
|
||||
|
||||
// Publish a message to the mq. Specify a topic to group messages for a specific topic.
|
||||
// Publish a message. Specify a topic to group messages for a specific topic.
|
||||
func PublishAmessage() {
|
||||
mqService := mq.NewMqService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := mqService.Publish(&mq.PublishRequest{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const { MqService } = require("m3o/mq");
|
||||
|
||||
// Publish a message to the mq. Specify a topic to group messages for a specific topic.
|
||||
// Publish a message. Specify a topic to group messages for a specific topic.
|
||||
async function publishAmessage() {
|
||||
let mqService = new MqService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await mqService.publish({
|
||||
|
||||
Reference in New Issue
Block a user