mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Merge branch 'master' of ssh://github.com/micro/services
This commit is contained in:
@@ -78,5 +78,5 @@
|
|||||||
"prepare": "npm run build"
|
"prepare": "npm run build"
|
||||||
},
|
},
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"version": "1.0.601"
|
"version": "1.0.603"
|
||||||
}
|
}
|
||||||
@@ -12,10 +12,10 @@ func CreateArecord() {
|
|||||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := dbService.Create(&db.CreateRequest{
|
rsp, err := dbService.Create(&db.CreateRequest{
|
||||||
Record: map[string]interface{}{
|
Record: map[string]interface{}{
|
||||||
"id": "1",
|
|
||||||
"name": "Jane",
|
"name": "Jane",
|
||||||
"age": 42,
|
"age": 42,
|
||||||
"isActive": true,
|
"isActive": true,
|
||||||
|
"id": "1",
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ func PublishAmessage() {
|
|||||||
eventService := event.NewEventService(os.Getenv("MICRO_API_TOKEN"))
|
eventService := event.NewEventService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := eventService.Publish(&event.PublishRequest{
|
rsp, err := eventService.Publish(&event.PublishRequest{
|
||||||
Message: map[string]interface{}{
|
Message: map[string]interface{}{
|
||||||
"id": "1",
|
|
||||||
"type": "signup",
|
"type": "signup",
|
||||||
"user": "john",
|
"user": "john",
|
||||||
|
"id": "1",
|
||||||
},
|
},
|
||||||
Topic: "user",
|
Topic: "user",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ func PublishAmessage() {
|
|||||||
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
|
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := streamService.Publish(&stream.PublishRequest{
|
rsp, err := streamService.Publish(&stream.PublishRequest{
|
||||||
Message: map[string]interface{}{
|
Message: map[string]interface{}{
|
||||||
"user": "john",
|
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"type": "signup",
|
"type": "signup",
|
||||||
|
"user": "john",
|
||||||
},
|
},
|
||||||
Topic: "events",
|
Topic: "events",
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user