Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-10 09:30:33 +00:00
parent 6a2dd1866b
commit 620ee63c4f
22 changed files with 1128 additions and 1128 deletions

View File

@@ -4,6 +4,36 @@ 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
@@ -118,33 +148,3 @@ 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)
}
```