All URIs are relative to http://localhost:8081
Method | HTTP request | Description |
---|---|---|
CreateRuntime | Post /runtime | Create runtime |
GetRuntime | Get /runtime/{id} | Get runtime |
ListRuntimes | Get /runtime | List runtimes |
Runtime CreateRuntime(ctx).CreateRuntime(createRuntime).Execute()
Create runtime
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
createRuntime := *openapiclient.NewCreateRuntime("Dockerfile_example", "Name_example") // CreateRuntime | Create runtime body
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RuntimeAPI.CreateRuntime(context.Background()).CreateRuntime(createRuntime).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RuntimeAPI.CreateRuntime``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateRuntime`: Runtime
fmt.Fprintf(os.Stdout, "Response from `RuntimeAPI.CreateRuntime`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateRuntimeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createRuntime | CreateRuntime | Create runtime body |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Runtime GetRuntime(ctx, id).Execute()
Get runtime
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
id := "id_example" // string | Runtime id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RuntimeAPI.GetRuntime(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RuntimeAPI.GetRuntime``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRuntime`: Runtime
fmt.Fprintf(os.Stdout, "Response from `RuntimeAPI.GetRuntime`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Runtime id |
Other parameters are passed through a pointer to a apiGetRuntimeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Runtime ListRuntimes(ctx).Execute()
List runtimes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RuntimeAPI.ListRuntimes(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RuntimeAPI.ListRuntimes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListRuntimes`: []Runtime
fmt.Fprintf(os.Stdout, "Response from `RuntimeAPI.ListRuntimes`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListRuntimesRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]