mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 10:55:11 +00:00
21 lines
429 B
Go
Executable File
21 lines
429 B
Go
Executable File
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: "my-first-func",
|
|
Repo: "github.com/m3o/nodejs-function-example",
|
|
Runtime: "nodejs14",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|