Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-09 15:06:12 +00:00
parent 92edd2c7df
commit f6a6c065b1
176 changed files with 918 additions and 1077 deletions

View File

@@ -4,33 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Function/api](
Endpoints:
## List
List all the deployed functions
[https://m3o.com/function/api#List](https://m3o.com/function/api#List)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/function"
)
// List all the deployed functions
func ListFunctions() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.List(&function.ListRequest{
})
fmt.Println(rsp, err)
}
```
## Delete
Delete a function by name
@@ -148,3 +121,30 @@ Request: map[string]interface{}{
}
```
## List
List all the deployed functions
[https://m3o.com/function/api#List](https://m3o.com/function/api#List)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/function"
)
// List all the deployed functions
func ListFunctions() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.List(&function.ListRequest{
})
fmt.Println(rsp, err)
}
```

View File

@@ -15,5 +15,4 @@ func main() {
Request: map[string]interface{}{},
})
fmt.Println(rsp, err)
}

View File

@@ -14,5 +14,4 @@ func main() {
Name: "helloworld",
})
fmt.Println(rsp, err)
}

View File

@@ -17,5 +17,4 @@ func main() {
Runtime: "nodejs14",
})
fmt.Println(rsp, err)
}

View File

@@ -14,5 +14,4 @@ func main() {
Name: "helloworld",
})
fmt.Println(rsp, err)
}

View File

@@ -12,5 +12,4 @@ func main() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.List(&function.ListRequest{})
fmt.Println(rsp, err)
}