function: Describe + Delete endpoints (#230)

This commit is contained in:
Janos Dobronszki
2021-10-14 10:29:18 +01:00
committed by GitHub
parent a67ecc0e36
commit e6e0b1a84d
12 changed files with 406 additions and 63 deletions

View File

@@ -0,0 +1,7 @@
curl "https://api.m3o.com/v1/function/Describe" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"name": "my-first-func",
"project": "tests"
}'

View File

@@ -0,0 +1,17 @@
package example
import (
"fmt"
"github.com/micro/services/clients/go/function"
"os"
)
//
func DescribeFunctionStatus() {
functionService := function.NewFunctionService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := functionService.Describe(&function.DescribeRequest{
Name: "my-first-func",
Project: "tests",
})
fmt.Println(rsp, err)
}

View File

@@ -0,0 +1,13 @@
import * as fx from "m3o/function";
//
async function DescribeFunctionStatus() {
let functionService = new fx.FunctionService(process.env.MICRO_API_TOKEN);
let rsp = await functionService.describe({
name: "my-first-func",
project: "tests",
});
console.log(rsp);
}
await DescribeFunctionStatus();