Commit from GitHub Actions (Generate Clients & Examples)

This commit is contained in:
asim
2021-10-27 16:00:38 +00:00
parent 4faa1f02bf
commit 7010c1f83d
4 changed files with 6 additions and 4 deletions

View File

@@ -53,10 +53,12 @@ func (t *DbService) Update(request *UpdateRequest) (*UpdateResponse, error) {
} }
type CountRequest struct { type CountRequest struct {
// specify the table name
Table string `json:"table"` Table string `json:"table"`
} }
type CountResponse struct { type CountResponse struct {
// the number of records in the table
Count int32 `json:"count"` Count int32 `json:"count"`
} }

View File

@@ -76,5 +76,5 @@
"prepare": "npm run build" "prepare": "npm run build"
}, },
"types": "index.d.ts", "types": "index.d.ts",
"version": "1.0.580" "version": "1.0.581"
} }

View File

@@ -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{}{
"age": 42,
"isActive": true,
"id": "1", "id": "1",
"name": "Jane", "name": "Jane",
"age": 42,
"isActive": true,
}, },
Table: "users", Table: "users",
}) })

View File

@@ -12,8 +12,8 @@ func UpdateArecord() {
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN")) dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := dbService.Update(&db.UpdateRequest{ rsp, err := dbService.Update(&db.UpdateRequest{
Record: map[string]interface{}{ Record: map[string]interface{}{
"age": 43,
"id": "1", "id": "1",
"age": 43,
}, },
Table: "users", Table: "users",
}) })