QuantCloud API
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.13.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import openapi "github.com/quantcdn/quant-hosting-go"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value openapi.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices and openapi.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ApplicationsAPI | CreateApplication | Post /organisations/{organisation}/applications | Create a new application |
| ApplicationsAPI | DeleteApplication | Delete /organisations/{organisation}/applications/{application} | Delete an application |
| ApplicationsAPI | GetApplication | Get /organisations/{organisation}/applications/{application} | Get a single application |
| ApplicationsAPI | GetEcrLoginCredentials | Get /organisations/{organisation}/applications/ecr-login | Get ECR login credentials |
| ApplicationsAPI | ListApplications | Get /organisations/{organisation}/applications | Get all applications for an organisation |
| CommandsAPI | CreateCommand | Post /organisations/{organisation}/environments/{environment}/commands | Create a command for an environment |
| CommandsAPI | GetCommand | Get /organisations/{organisation}/environments/{environment}/commands/{command} | Get a command |
| CommandsAPI | ListCommands | Get /organisations/{organisation}/environments/{environment}/commands | Get all commands for an environment |
| ComposeAPI | GetEnvironmentCompose | Get /organisations/{organisation}/environments/{environment}/compose | Get the compose file for an environment |
| ComposeAPI | ValidateCompose | Post /organisations/{organisation}/compose/validate | Validate a compose file |
| ContainersAPI | ListContainers | Get /organisations/{organisation}/applications/{application}/environments/{environment}/containers | Get the containers in an environment |
| ContainersAPI | UpdateContainer | Put /organisations/{organisation}/applications/{application}/environments/{environment}/containers/{container} | Update a container in an environment |
| CronAPI | CreateCronJob | Post /organisations/{organisation}/applications/{application}/environments/{environment}/cron | Create a new cron job |
| CronAPI | DeleteCronJob | Delete /organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron} | Delete a cron job |
| CronAPI | GetCronJob | Get /organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron} | Get a cron job |
| CronAPI | GetCronRun | Get /organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron}/runs/{run} | Get a cron run |
| CronAPI | ListCronJobRuns | Get /organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron}/runs | Get all runs for a cron job |
| CronAPI | ListCronJobs | Get /organisations/{organisation}/applications/{application}/environments/{environment}/cron | Get all cron jobs for an environment |
| CronAPI | UpdateCronJob | Patch /organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron} | Update a cron job |
| EnvironmentsAPI | CreateEnvironment | Post /organisations/{organisation}/applications/{application}/environments | Create a new environment |
| EnvironmentsAPI | DeleteEnvironment | Delete /organisations/{organisation}/applications/{application}/environments/{environment} | Delete an environment |
| EnvironmentsAPI | GetEnvironment | Get /organisations/{organisation}/applications/{application}/environments/{environment} | Get a single environment |
| EnvironmentsAPI | GetEnvironmentLogs | Get /organisations/{organisation}/applications/{application}/environments/{environment}/logs | Get the logs for an environment |
| EnvironmentsAPI | GetEnvironmentMetrics | Get /organisations/{organisation}/applications/{application}/environments/{environment}/metrics | Get the metrics for an environment |
| EnvironmentsAPI | ListEnvironments | Get /organisations/{organisation}/applications/{application}/environments | Get all environments for an application |
| EnvironmentsAPI | UpdateEnvironment | Put /organisations/{organisation}/applications/{application}/environments/{environment} | Update the compose for an environment |
| EnvironmentsAPI | UpdateEnvironmentState | Put /organisations/{organisation}/applications/{application}/environments/{environment}/state | Update the state of an environment |
| ScalingPolicyAPI | DeleteScalingPolicy | Delete /organisations/{organisation}/applications/{application}/environments/{environment}/scaling-policies/{policyName} | Delete the scaling policy for an environment |
| ScalingPolicyAPI | GetScalingPolicies | Get /organisations/{organisation}/applications/{application}/environments/{environment}/scaling-policies | Get the scaling policies for an environment |
| ScalingPolicyAPI | UpdateScalingPolicy | Put /organisations/{organisation}/applications/{application}/environments/{environment}/scaling-policies | Update the scaling policy for an environment |
| VariablesAPI | DeleteEnvironmentVariable | Delete /organisations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables/{api_variable} | Delete a variable |
| VariablesAPI | ListEnvironmentVariables | Get /organisations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables | Get all variables for an environment |
| VariablesAPI | UpdateEnvironmentVariable | Put /organisations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables/{api_variable} | Update a variable |
| VolumesAPI | CreateVolume | Post /organisations/{organisation}/applications/{application}/environments/{environment}/volumes | Create a new volume |
| VolumesAPI | DeleteVolume | Delete /organisations/{organisation}/applications/{application}/environments/{environment}/volumes/{volume} | Delete a volume |
| VolumesAPI | GetVolume | Get /organisations/{organisation}/applications/{application}/environments/{environment}/volumes/{volume} | Get a volume |
| VolumesAPI | ListVolumes | Get /organisations/{organisation}/applications/{application}/environments/{environment}/volumes | Get all volumes for an environment |
- Application
- Command
- Compose
- Container
- ContainerEnvironmentInner
- ContainerImageReference
- ContainerMountPointsInner
- CreateCommandRequest
- CreateCronJob422Response
- CreateCronJobRequest
- CreateEnvironmentRequest
- Cron
- CronRun
- Environment
- GetEcrLoginCredentials200Response
- ScalingPolicy
- UpdateCronJobRequest
- UpdateEnvironmentRequest
- UpdateEnvironmentStateRequest
- UpdateEnvironmentVariableRequest
- ValidateCompose200Response
- ValidateComposeRequest
- Variable
- Volume
Endpoints do not require authorization.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime