Skip to content

Latest commit

 

History

History
329 lines (309 loc) · 21.6 KB

README.md

File metadata and controls

329 lines (309 loc) · 21.6 KB

Go API client for tsuru

Open source, extensible and Docker-based Platform as a Service (PaaS)

Overview

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.24
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./tsuru"

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AppApi AppBuild Post /1.5/apps/{app}/build
AppApi AppCnameAdd Post /1.0/apps/{app}/cname
AppApi AppCnameDelete Delete /1.0/apps/{app}/cname
AppApi AppCreate Post /1.0/apps
AppApi AppDelete Delete /1.0/apps/{app}
AppApi AppDeploy Post /1.0/apps/{app}/deploy
AppApi AppGet Get /1.0/apps/{app}
AppApi AppGetCertificates Get /1.24/apps/{app}/certificate
AppApi AppList Get /1.0/apps
AppApi AppQuotaChange Put /1.0/apps/{app}/quota
AppApi AppQuotaGet Get /1.0/apps/{app}/quota
AppApi AppRestart Post /1.0/apps/{app}/restart
AppApi AppRouterAdd Post /1.5/apps/{app}/routers
AppApi AppRouterDelete Delete /1.5/apps/{app}/routers/{router}
AppApi AppRouterList Get /1.5/apps/{app}/routers
AppApi AppRouterUpdate Put /1.5/apps/{app}/routers/{router}
AppApi AppRun Post /1.0/apps/{app}/run
AppApi AppSetCertIssuer Put /1.24/apps/{app}/certissuer
AppApi AppSetRoutable Post /1.8/apps/{app}/routable
AppApi AppStart Post /1.0/apps/{app}/start
AppApi AppStop Post /1.0/apps/{app}/stop
AppApi AppTeamGrant Put /1.0/apps/{app}/teams/{team}
AppApi AppTeamRevoke Delete /1.0/apps/{app}/teams/{team}
AppApi AppUnsetCertIssuer Delete /1.24/apps/{app}/certissuer
AppApi AppUpdate Put /1.0/apps/{app}
AppApi AutoScaleAdd Post /1.9/apps/{app}/units/autoscale
AppApi AutoScaleInfo Get /1.9/apps/{app}/units/autoscale
AppApi AutoScaleRemove Delete /1.9/apps/{app}/units/autoscale
AppApi CertificatUnset Delete /1.0/apps/{app}/certificate
AppApi CertificateSet Put /1.0/apps/{app}/certificate
AppApi EnvGet Get /1.0/apps/{app}/env
AppApi EnvSet Post /1.0/apps/{app}/env
AppApi EnvUnset Delete /1.0/apps/{app}/env
AppApi UnitsAdd Put /1.0/apps/{app}/units
AppApi UnitsRemove Delete /1.0/apps/{app}/units
AuthApi AssignRoleToGroup Post /1.9/roles/{role_name}/group
AuthApi AssignRoleToToken Post /1.6/roles/{role_name}/token
AuthApi CreateRole Post /1.0/roles
AuthApi DefaultRoleAdd Post /1.0/role/default
AuthApi DeleteRole Delete /1.0/roles/{role_name}
AuthApi DissociateRole Delete /1.0/roles/{role_name}/user/{email}
AuthApi DissociateRoleFromGroup Delete /1.6/roles/{role_name}/group/{group_name}
AuthApi DissociateRoleFromToken Delete /1.6/roles/{role_name}/token/{token_id}
AuthApi PermissionAdd Post /1.0/roles/{role_name}/permissions
AuthApi RemovePermission Delete /1.0/roles{role_name}/permissions/{permission}
AuthApi RoleAssign Post /1,0/roles/{role_name}/user
AuthApi RoleDefaultDelete Delete /1.0/role/default
AuthApi TeamTokenCreate Post /1.6/tokens
AuthApi TeamTokenDelete Delete /1.6/tokens/{token_id}
AuthApi TeamTokenInfo Get /1.7/tokens/{token_id}
AuthApi TeamTokenUpdate Put /1.6/tokens/{token_id}
AuthApi TeamTokensList Get /1.6/tokens
AuthApi UpdateRole Put /1.0/roles
ClusterApi ClusterCreate Post /1.3/provisioner/clusters
ClusterApi ClusterDelete Delete /1.3/provisioner/clusters/{cluster_name}
ClusterApi ClusterInfo Get /1.8/provisioner/clusters/{cluster_name}
ClusterApi ClusterList Get /1.3/provisioner/clusters
ClusterApi ClusterUpdate Post /1.4/provisioner/clusters/{cluster_name}
ClusterApi ProvisionerList Get /1.7/provisioner
EventApi EventCancel Post /1.1/events/{eventid}/cancel
EventApi EventInfo Get /1.1/events/{eventid}
EventApi WebhookCreate Post /1.6/events/webhooks
EventApi WebhookDelete Delete /1.6/events/webhooks/{name}
EventApi WebhookGet Get /1.6/events/webhooks/{name}
EventApi WebhookList Get /1.6/events/webhooks
EventApi WebhookUpdate Put /1.6/events/webhooks/{name}
JobApi CreateJob Post /1.13/jobs
JobApi DeleteJob Delete /1.13/jobs/{name}
JobApi GetJob Get /1.13/jobs/{name}
JobApi JobEnvGet Get /1.16/jobs/{name}/env
JobApi JobEnvSet Post /1.13/jobs/{name}/env
JobApi JobEnvUnset Delete /1.13/jobs/{name}/env
JobApi JobLog Get /1.13/jobs/{name}/log
JobApi ListJob Get /1.13/jobs
JobApi TriggerJob Post /1.13/jobs/{name}/trigger
JobApi UpdateJob Put /1.13/jobs/{name}
PlanApi DeletePlan Delete /1.0/plans/{plan}
PlanApi PlanCreate Post /1.0/plans
PlanApi PlanList Get /1.0/plans
PlatformApi PlatformAdd Post /1.0/platforms
PlatformApi PlatformDelete Delete /1.0/platforms/{platform}
PlatformApi PlatformInfo Get /1.6/platforms/{platform}
PlatformApi PlatformList Get /1.0/platforms
PlatformApi PlatformRollback Post /1.6/platforms/{platform}/rollback
PlatformApi PlatformUpdate Put /1.0/platforms/{platform}
PoolApi ConstraintList Get /1.3/constraints
PoolApi ConstraintSet Put /1.3/constraints
PoolApi PoolCreate Post /1.0/pools
PoolApi PoolDelete Delete /pools/{pool}
PoolApi PoolGet Get /pools/{pool}
PoolApi PoolList Get /1.0/pools
PoolApi PoolUpdate Put /pools/{pool}
RouterApi RouterCreate Post /1.8/routers
RouterApi RouterDelete Delete /1.8/routers/{name}
RouterApi RouterList Get /1.3/routers
RouterApi RouterUpdate Put /1.8/routers/{name}
ServiceApi InstanceCreate Post /1.0/services/{service}/instances
ServiceApi InstanceDelete Delete /1.0/services/{service}/instances/{instance}
ServiceApi InstanceGet Get /1.0/services/{service}/instances/{instance}
ServiceApi InstanceUpdate Put /1.0/services/{service}/instances/{instance}
ServiceApi InstancesList Get /1.0/services/instances
ServiceApi JobServiceInstanceBind Put /1.13/services/{service}/instances/{instance}/jobs/{job}
ServiceApi JobServiceInstanceUnbind Delete /1.13/services/{service}/instances/{instance}/jobs/{job}
ServiceApi ServiceAddDoc Put /1.0/services/{name}/doc
ServiceApi ServiceBrokerCreate Post /1.7/brokers
ServiceApi ServiceBrokerDelete Delete /1.7/brokers/{name}
ServiceApi ServiceBrokerList Get /1.7/brokers
ServiceApi ServiceBrokerUpdate Put /1.7/brokers/{name}
ServiceApi ServiceCreate Post /1.0/services
ServiceApi ServiceDelete Delete /1.0/services/{name}
ServiceApi ServiceDoc Get /1.0/services/{name}/doc
ServiceApi ServiceGrantTeam Put /1.0/services/{service}/team/{team}
ServiceApi ServiceInfo Get /1.0/services/{name}
ServiceApi ServiceInstanceBind Put /1.13/services/{service}/instances/{instance}/apps/{app}
ServiceApi ServiceInstanceBind10 Put /1.0/services/{service}/instances/{instance}/{app}
ServiceApi ServiceInstanceGrant Put /1.0/services/{service}/instances/permission/{instance}/{team}
ServiceApi ServiceInstanceRevoke Delete /1.0/services/{service}/instances/permission/{instance}/{team}
ServiceApi ServiceInstanceStatus Get /1.0/services/{service}/instances/{instance}/status
ServiceApi ServiceInstanceUnbind Delete /1.13/services/{service}/instances/{instance}/apps/{app}
ServiceApi ServiceInstanceUnbind10 Delete /1.0/services/{service}/instances/{instance}/{app}
ServiceApi ServicePlans Get /1.0/services/{name}/plans
ServiceApi ServiceRevokeTeam Delete /1.0/services/{service}/team/{team}
ServiceApi ServiceUpdate Put /1.0/services/{name}
ServiceApi ServicesList Get /1.0/services
TeamApi TeamCreate Post /1.0/teams
TeamApi TeamDelete Delete /1.0/teams/{team}
TeamApi TeamGet Get /1.4/teams/{team}
TeamApi TeamGroupList Get /1.17/teams/{team}/groups
TeamApi TeamQuotaChange Put /1.12/teams/{team}/quota
TeamApi TeamQuotaGet Get /1.12/teams/{team}/quota
TeamApi TeamUpdate Put /1.6/teams/{team}
TeamApi TeamUserList Get /1.17/teams/{team}/users
TeamApi TeamsList Get /1.0/teams
UserApi APITokenGet Get /1.0/users/api-key
UserApi APITokenRegenerate Post /1.0/users/api-key
UserApi ChangePassword Put /1.0/users/password
UserApi ResetPassword Post /1.0/users/{email}/password
UserApi UserCreate Post /1.0/users
UserApi UserDelete Delete /1.0/users
UserApi UserGet Get /1.0/users/info
UserApi UserQuotaChange Put /1.0/users/{email}/quota
UserApi UserQuotaGet Get /1.0/users/{email}/quota
UserApi UserTokenDelete Delete /1.0/users/tokens
UserApi UsersList Get /1.0/users
VolumeApi VolumeBind Post /1.4/volumes/{volume}/bind
VolumeApi VolumeCreate Post /1.4/volumes
VolumeApi VolumeDelete Delete /1.4/volumes/{volume}
VolumeApi VolumeGet Get /1.4/volumes/{volume}
VolumeApi VolumeList Get /1.4/volumes
VolumeApi VolumePlansList Get /1.4/volumeplans
VolumeApi VolumeUnbind Delete /1.4/volumes/{volume}/bind
VolumeApi VolumeUpdate Put /1.4/volumes/{volume}

Documentation For Models

Documentation For Authorization

Bearer

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author