forked from salesforce/anypoint-client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from mulesoft-anypoint/dev
Runtime Fabrics + App Deployment v2 + TLS Context
- Loading branch information
Showing
145 changed files
with
28,570 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
*.so | ||
|
||
# Folders | ||
_obj | ||
_test | ||
|
||
# Architecture specific extensions/prefixes | ||
*.[568vq] | ||
[568vq].out | ||
|
||
*.cgo1.go | ||
*.cgo2.c | ||
_cgo_defun.c | ||
_cgo_gotypes.go | ||
_cgo_export.* | ||
|
||
_testmain.go | ||
|
||
*.exe | ||
*.test | ||
*.prof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.gitignore | ||
.openapi-generator-ignore | ||
.travis.yml | ||
README.md | ||
api/openapi.yaml | ||
api_default.go | ||
client.go | ||
configuration.go | ||
docs/AnypointMonitoring.md | ||
docs/AnypointMonitoringResources.md | ||
docs/AnypointMonitoringResourcesCpu.md | ||
docs/AppConfiguration.md | ||
docs/Application.md | ||
docs/ApplicationIntegrations.md | ||
docs/Autoscaling.md | ||
docs/DefaultApi.md | ||
docs/Deployment.md | ||
docs/DeploymentItem.md | ||
docs/DeploymentItemApplication.md | ||
docs/DeploymentItemTarget.md | ||
docs/DeploymentRequestBody.md | ||
docs/DeploymentResponsePaged.md | ||
docs/DeploymentSettings.md | ||
docs/Http.md | ||
docs/HttpInbound.md | ||
docs/Jvm.md | ||
docs/MuleAgentAppPropService.md | ||
docs/MuleAgentLoggingService.md | ||
docs/MuleAgentSchedulingService.md | ||
docs/ObjectStoreV2.md | ||
docs/Ref.md | ||
docs/Replicas.md | ||
docs/Resources.md | ||
docs/ResourcesCpu.md | ||
docs/ResourcesMemory.md | ||
docs/ResourcesStorage.md | ||
docs/Runtime.md | ||
docs/Scheduler.md | ||
docs/ScopeLoggingConfiguration.md | ||
docs/Services.md | ||
docs/Sidecars.md | ||
docs/State.md | ||
docs/Target.md | ||
git_push.sh | ||
go.mod | ||
go.sum | ||
model_anypoint_monitoring.go | ||
model_anypoint_monitoring_resources.go | ||
model_anypoint_monitoring_resources_cpu.go | ||
model_app_configuration.go | ||
model_application.go | ||
model_application_integrations.go | ||
model_autoscaling.go | ||
model_deployment.go | ||
model_deployment_item.go | ||
model_deployment_item_application.go | ||
model_deployment_item_target.go | ||
model_deployment_request_body.go | ||
model_deployment_response_paged.go | ||
model_deployment_settings.go | ||
model_http.go | ||
model_http_inbound.go | ||
model_jvm.go | ||
model_mule_agent_app_prop_service.go | ||
model_mule_agent_logging_service.go | ||
model_mule_agent_scheduling_service.go | ||
model_object_store_v2.go | ||
model_ref.go | ||
model_replicas.go | ||
model_resources.go | ||
model_resources_cpu.go | ||
model_resources_memory.go | ||
model_resources_storage.go | ||
model_runtime.go | ||
model_scheduler.go | ||
model_scope_logging_configuration.go | ||
model_services.go | ||
model_sidecars.go | ||
model_state.go | ||
model_target.go | ||
response.go | ||
test/api_default_test.go | ||
utils.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
language: go | ||
|
||
install: | ||
- go get -d -v . | ||
|
||
script: | ||
- go build -v ./ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
# Go API client for application_manager_v2 | ||
|
||
The Application Manager API exists to provide Mule Application management operations from Anypoint Control Planes to any Runtime Plane, with capabilities that include: | ||
- Deploying a Mule Application or API to a Mule Runtime | ||
- Scaling up or down a running application | ||
- Managing application settings (ie: properties) | ||
- Deleting a Mule Application Deployment | ||
- Changing artifact version or configurations of a deployment | ||
- Starting, Stopping or Restarting applications | ||
- etc. | ||
This API currently supports deployments to Runtime Fabric and CloudHub 2.0 targets only. | ||
|
||
|
||
## Overview | ||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. | ||
|
||
- API version: 1.0.0 | ||
- Package version: 1.0.0 | ||
- Build package: org.openapitools.codegen.languages.GoClientCodegen | ||
|
||
## Installation | ||
|
||
Install the following dependencies: | ||
|
||
```shell | ||
go get github.com/stretchr/testify/assert | ||
go get golang.org/x/net/context | ||
``` | ||
|
||
Put the package under your project folder and add the following in import: | ||
|
||
```golang | ||
import application_manager_v2 "github.com/mulesoft-anypoint/anypoint-client-go/application_manager_v2" | ||
``` | ||
|
||
To use a proxy, set the environment variable `HTTP_PROXY`: | ||
|
||
```golang | ||
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") | ||
``` | ||
|
||
## Configuration of Server URL | ||
|
||
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. | ||
|
||
### Select Server Configuration | ||
|
||
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. | ||
|
||
```golang | ||
ctx := context.WithValue(context.Background(), application_manager_v2.ContextServerIndex, 1) | ||
``` | ||
|
||
### Templated Server URL | ||
|
||
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. | ||
|
||
```golang | ||
ctx := context.WithValue(context.Background(), application_manager_v2.ContextServerVariables, map[string]string{ | ||
"basePath": "v2", | ||
}) | ||
``` | ||
|
||
Note, enum values are always validated and all unused variables are silently ignored. | ||
|
||
### URLs Configuration per Operation | ||
|
||
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 `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. | ||
|
||
```golang | ||
ctx := context.WithValue(context.Background(), application_manager_v2.ContextOperationServerIndices, map[string]int{ | ||
"{classname}Service.{nickname}": 2, | ||
}) | ||
ctx = context.WithValue(context.Background(), application_manager_v2.ContextOperationServerVariables, map[string]map[string]string{ | ||
"{classname}Service.{nickname}": { | ||
"port": "8443", | ||
}, | ||
}) | ||
``` | ||
|
||
## Documentation for API Endpoints | ||
|
||
All URIs are relative to *https://anypoint.mulesoft.com/amc/application-manager/api/v2* | ||
|
||
Class | Method | HTTP request | Description | ||
------------ | ------------- | ------------- | ------------- | ||
*DefaultApi* | [**DeleteDeployment**](docs/DefaultApi.md#deletedeployment) | **Delete** /organizations/{orgId}/environments/{envId}/deployments/{deploymentId} | Delete deployment | ||
*DefaultApi* | [**GetAllDeployments**](docs/DefaultApi.md#getalldeployments) | **Get** /organizations/{orgId}/environments/{envId}/deployments | List deployments | ||
*DefaultApi* | [**GetDeploymentById**](docs/DefaultApi.md#getdeploymentbyid) | **Get** /organizations/{orgId}/environments/{envId}/deployments/{deploymentId} | Get a deploymnt | ||
*DefaultApi* | [**PatchDeployment**](docs/DefaultApi.md#patchdeployment) | **Patch** /organizations/{orgId}/environments/{envId}/deployments/{deploymentId} | Patch a deployment | ||
*DefaultApi* | [**PostDeployment**](docs/DefaultApi.md#postdeployment) | **Post** /organizations/{orgId}/environments/{envId}/deployments | Create deployment | ||
|
||
|
||
## Documentation For Models | ||
|
||
- [AnypointMonitoring](docs/AnypointMonitoring.md) | ||
- [AnypointMonitoringResources](docs/AnypointMonitoringResources.md) | ||
- [AnypointMonitoringResourcesCpu](docs/AnypointMonitoringResourcesCpu.md) | ||
- [AppConfiguration](docs/AppConfiguration.md) | ||
- [Application](docs/Application.md) | ||
- [ApplicationIntegrations](docs/ApplicationIntegrations.md) | ||
- [Autoscaling](docs/Autoscaling.md) | ||
- [Deployment](docs/Deployment.md) | ||
- [DeploymentItem](docs/DeploymentItem.md) | ||
- [DeploymentItemApplication](docs/DeploymentItemApplication.md) | ||
- [DeploymentItemTarget](docs/DeploymentItemTarget.md) | ||
- [DeploymentRequestBody](docs/DeploymentRequestBody.md) | ||
- [DeploymentResponsePaged](docs/DeploymentResponsePaged.md) | ||
- [DeploymentSettings](docs/DeploymentSettings.md) | ||
- [Http](docs/Http.md) | ||
- [HttpInbound](docs/HttpInbound.md) | ||
- [Jvm](docs/Jvm.md) | ||
- [MuleAgentAppPropService](docs/MuleAgentAppPropService.md) | ||
- [MuleAgentLoggingService](docs/MuleAgentLoggingService.md) | ||
- [MuleAgentSchedulingService](docs/MuleAgentSchedulingService.md) | ||
- [ObjectStoreV2](docs/ObjectStoreV2.md) | ||
- [Ref](docs/Ref.md) | ||
- [Replicas](docs/Replicas.md) | ||
- [Resources](docs/Resources.md) | ||
- [ResourcesCpu](docs/ResourcesCpu.md) | ||
- [ResourcesMemory](docs/ResourcesMemory.md) | ||
- [ResourcesStorage](docs/ResourcesStorage.md) | ||
- [Runtime](docs/Runtime.md) | ||
- [Scheduler](docs/Scheduler.md) | ||
- [ScopeLoggingConfiguration](docs/ScopeLoggingConfiguration.md) | ||
- [Services](docs/Services.md) | ||
- [Sidecars](docs/Sidecars.md) | ||
- [State](docs/State.md) | ||
- [Target](docs/Target.md) | ||
|
||
|
||
## Documentation For Authorization | ||
|
||
|
||
Authentication schemes defined for the API: | ||
### bearerAuth | ||
|
||
- **Type**: HTTP Bearer token authentication | ||
|
||
Example | ||
|
||
```golang | ||
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") | ||
r, err := client.Service.Operation(auth, args) | ||
``` | ||
|
||
|
||
## Documentation for Utility Methods | ||
|
||
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: | ||
|
||
* `PtrBool` | ||
* `PtrInt` | ||
* `PtrInt32` | ||
* `PtrInt64` | ||
* `PtrFloat` | ||
* `PtrFloat32` | ||
* `PtrFloat64` | ||
* `PtrString` | ||
* `PtrTime` | ||
|
||
## Author | ||
|
||
|
||
|
Oops, something went wrong.