mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 02:45:11 +00:00
24 lines
487 B
Go
Executable File
24 lines
487 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/function"
|
|
)
|
|
|
|
// Deploy a group of functions
|
|
func main() {
|
|
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := functionService.Deploy(&function.DeployRequest{
|
|
Branch: "main",
|
|
Entrypoint: "Helloworld",
|
|
Name: "helloworld",
|
|
Region: "europe-west1",
|
|
Repo: "https://github.com/m3o/m3o",
|
|
Runtime: "go116",
|
|
Subfolder: "examples/go-function",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|