Commit from GitHub Actions (Publish APIs & Clients)

This commit is contained in:
asim
2021-10-11 12:57:40 +00:00
parent 6713c12477
commit 4b9902a2e4
8 changed files with 10 additions and 10 deletions

View File

@@ -22,7 +22,7 @@ func (t *FunctionService) Call(request *CallRequest) (*CallResponse, error) {
return rsp, t.client.Call("function", "Call", request, rsp) return rsp, t.client.Call("function", "Call", request, rsp)
} }
// // Delete a function by name
func (t *FunctionService) Delete(request *DeleteRequest) (*DeleteResponse, error) { func (t *FunctionService) Delete(request *DeleteRequest) (*DeleteResponse, error) {
rsp := &DeleteResponse{} rsp := &DeleteResponse{}
return rsp, t.client.Call("function", "Delete", request, rsp) return rsp, t.client.Call("function", "Delete", request, rsp)
@@ -34,7 +34,7 @@ func (t *FunctionService) Deploy(request *DeployRequest) (*DeployResponse, error
return rsp, t.client.Call("function", "Deploy", request, rsp) return rsp, t.client.Call("function", "Deploy", request, rsp)
} }
// // List all the deployed functions
func (t *FunctionService) List(request *ListRequest) (*ListResponse, error) { func (t *FunctionService) List(request *ListRequest) (*ListResponse, error) {
rsp := &ListResponse{} rsp := &ListResponse{}
return rsp, t.client.Call("function", "List", request, rsp) return rsp, t.client.Call("function", "List", request, rsp)

View File

@@ -14,7 +14,7 @@ export class FunctionService {
request request
) as Promise<CallResponse>; ) as Promise<CallResponse>;
} }
// // Delete a function by name
delete(request: DeleteRequest): Promise<DeleteResponse> { delete(request: DeleteRequest): Promise<DeleteResponse> {
return this.client.call( return this.client.call(
"function", "function",
@@ -30,7 +30,7 @@ export class FunctionService {
request request
) as Promise<DeployResponse>; ) as Promise<DeployResponse>;
} }
// // List all the deployed functions
list(request: ListRequest): Promise<ListResponse> { list(request: ListRequest): Promise<ListResponse> {
return this.client.call( return this.client.call(
"function", "function",

View File

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

View File

@@ -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",
}) })

View File

@@ -6,7 +6,7 @@ import (
"os" "os"
) )
// // Delete a function by name
func DeleteAfunction() { func DeleteAfunction() {
functionService := function.NewFunctionService(os.Getenv("MICRO_API_TOKEN")) functionService := function.NewFunctionService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := functionService.Delete(&function.DeleteRequest{ rsp, err := functionService.Delete(&function.DeleteRequest{

View File

@@ -1,6 +1,6 @@
import * as fx from "m3o/function"; import * as fx from "m3o/function";
// // Delete a function by name
async function DeleteAfunction() { async function DeleteAfunction() {
let functionService = new fx.FunctionService(process.env.MICRO_API_TOKEN); let functionService = new fx.FunctionService(process.env.MICRO_API_TOKEN);
let rsp = await functionService.delete({ let rsp = await functionService.delete({

View File

@@ -6,7 +6,7 @@ import (
"os" "os"
) )
// // List all the deployed functions
func ListFunctions() { func ListFunctions() {
functionService := function.NewFunctionService(os.Getenv("MICRO_API_TOKEN")) functionService := function.NewFunctionService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := functionService.List(&function.ListRequest{}) rsp, err := functionService.List(&function.ListRequest{})

View File

@@ -1,6 +1,6 @@
import * as fx from "m3o/function"; import * as fx from "m3o/function";
// // List all the deployed functions
async function ListFunctions() { async function ListFunctions() {
let functionService = new fx.FunctionService(process.env.MICRO_API_TOKEN); let functionService = new fx.FunctionService(process.env.MICRO_API_TOKEN);
let rsp = await functionService.list({}); let rsp = await functionService.list({});