Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-02 13:26:57 +00:00
parent 949f7358ae
commit ab6fda2a88
15 changed files with 702 additions and 702 deletions

View File

@@ -4,36 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Function/api](
Endpoints:
## Call
Call a function by name
[https://m3o.com/function/api#Call](https://m3o.com/function/api#Call)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/function"
)
// Call a function by name
func CallAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Call(&function.CallRequest{
Name: "helloworld",
Request: map[string]interface{}{
},
})
fmt.Println(rsp, err)
}
```
## List
List all the deployed functions
@@ -148,3 +118,33 @@ Runtime: "nodejs14",
}
```
## Call
Call a function by name
[https://m3o.com/function/api#Call](https://m3o.com/function/api#Call)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/function"
)
// Call a function by name
func CallAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Call(&function.CallRequest{
Name: "helloworld",
Request: map[string]interface{}{
},
})
fmt.Println(rsp, err)
}
```