Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-01 18:57:58 +00:00
parent c93f6ca3f8
commit f80a59c744
23 changed files with 768 additions and 774 deletions

View File

@@ -26,8 +26,7 @@ func DeployAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Deploy(&function.DeployRequest{
Entrypoint: "helloworld",
Name: "my-first-func",
Project: "tests",
Name: "helloworld",
Repo: "github.com/m3o/nodejs-function-example",
Runtime: "nodejs14",
@@ -57,7 +56,7 @@ import(
func CallAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Call(&function.CallRequest{
Name: "my-first-func",
Name: "helloworld",
Request: map[string]interface{}{
},
@@ -114,8 +113,7 @@ import(
func DeleteAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Delete(&function.DeleteRequest{
Name: "my-first-func",
Project: "tests",
Name: "helloworld",
})
fmt.Println(rsp, err)
@@ -143,8 +141,7 @@ import(
func DescribeFunctionStatus() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Describe(&function.DescribeRequest{
Name: "my-first-func",
Project: "tests",
Name: "helloworld",
})
fmt.Println(rsp, err)

View File

@@ -11,7 +11,7 @@ import (
func main() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Call(&function.CallRequest{
Name: "my-first-func",
Name: "helloworld",
Request: map[string]interface{}{},
})
fmt.Println(rsp, err)

View File

@@ -11,8 +11,7 @@ import (
func main() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Delete(&function.DeleteRequest{
Name: "my-first-func",
Project: "tests",
Name: "helloworld",
})
fmt.Println(rsp, err)

View File

@@ -12,8 +12,7 @@ func main() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Deploy(&function.DeployRequest{
Entrypoint: "helloworld",
Name: "my-first-func",
Project: "tests",
Name: "helloworld",
Repo: "github.com/m3o/nodejs-function-example",
Runtime: "nodejs14",
})

View File

@@ -11,8 +11,7 @@ import (
func main() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Describe(&function.DescribeRequest{
Name: "my-first-func",
Project: "tests",
Name: "helloworld",
})
fmt.Println(rsp, err)