Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-13 17:04:45 +00:00
parent 9a662c1dcc
commit 23de678eeb
22 changed files with 838 additions and 838 deletions

View File

@@ -4,9 +4,40 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Function/api](
Endpoints:
## Deploy
Deploy a group of functions
[https://m3o.com/function/api#Deploy](https://m3o.com/function/api#Deploy)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/function"
)
// Deploy a group of functions
func DeployAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Deploy(&function.DeployRequest{
Entrypoint: "helloworld",
Name: "helloworld",
Repo: "github.com/m3o/nodejs-function-example",
Runtime: "nodejs14",
})
fmt.Println(rsp, err)
}
```
## Update
Update a function
[https://m3o.com/function/api#Update](https://m3o.com/function/api#Update)
@@ -21,7 +52,7 @@ import(
"go.m3o.com/function"
)
//
// Update a function
func UpdateAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Update(&function.UpdateRequest{
@@ -148,34 +179,3 @@ func DescribeFunctionStatus() {
}
```
## Deploy
Deploy a group of functions
[https://m3o.com/function/api#Deploy](https://m3o.com/function/api#Deploy)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/function"
)
// Deploy a group of functions
func DeployAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Deploy(&function.DeployRequest{
Entrypoint: "helloworld",
Name: "helloworld",
Repo: "github.com/m3o/nodejs-function-example",
Runtime: "nodejs14",
})
fmt.Println(rsp, err)
}
```

View File

@@ -7,7 +7,7 @@ import (
"go.m3o.com/function"
)
//
// Update a function
func main() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Update(&function.UpdateRequest{