mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-14 20:14:47 +00:00
Merge branch 'master' of ssh://github.com/micro/services
This commit is contained in:
@@ -53,7 +53,9 @@ type CallResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type DeleteRequest struct {
|
type DeleteRequest struct {
|
||||||
Name string `json:"name"`
|
// The name of the function
|
||||||
|
Name string `json:"name"`
|
||||||
|
// Optional project name
|
||||||
Project string `json:"project"`
|
Project string `json:"project"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,10 +96,11 @@ type Func struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ListRequest struct {
|
type ListRequest struct {
|
||||||
// optional
|
// optional project name
|
||||||
Project string `json:"project"`
|
Project string `json:"project"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListResponse struct {
|
type ListResponse struct {
|
||||||
|
// List of functions deployed
|
||||||
Functions []Func `json:"functions"`
|
Functions []Func `json:"functions"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ export interface CallResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DeleteRequest {
|
export interface DeleteRequest {
|
||||||
|
// The name of the function
|
||||||
name?: string;
|
name?: string;
|
||||||
|
// Optional project name
|
||||||
project?: string;
|
project?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,10 +94,11 @@ export interface Func {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ListRequest {
|
export interface ListRequest {
|
||||||
// optional
|
// optional project name
|
||||||
project?: string;
|
project?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ListResponse {
|
export interface ListResponse {
|
||||||
|
// List of functions deployed
|
||||||
functions?: Func[];
|
functions?: Func[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,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",
|
|
||||||
"age": 42,
|
"age": 42,
|
||||||
"isActive": true,
|
"isActive": true,
|
||||||
|
"id": "1",
|
||||||
|
"name": "Jane",
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,8 +11,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{}{
|
||||||
"id": "1",
|
|
||||||
"age": 43,
|
"age": 43,
|
||||||
|
"id": "1",
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user