No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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: 2.0.0
- Package version: 0.0.1
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import sw "./mist_sdk"
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 sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), sw.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 identifield 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.
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://mist.io
Class | Method | HTTP request | Description |
---|---|---|---|
CloudsApi | AddCloud | Post /api/v2/clouds | Add cloud |
CloudsApi | DeleteCloud | Delete /api/v2/clouds/{cloud} | Delete cloud |
CloudsApi | EditCloud | Put /api/v2/clouds/{cloud} | Edit cloud |
CloudsApi | GetCloud | Get /api/v2/clouds/{cloud} | Get cloud |
CloudsApi | ListClouds | Get /api/v2/clouds | List clouds |
CloudsCountApi | GetOrg | Get /api/v2/orgs/{org} | Get Org |
ImagesApi | GetImage | Get /api/v2/images/{image} | Get image |
ImagesApi | ListImages | Get /api/v2/images | List images |
JobsApi | GetJob | Get /api/v2/jobs/{job_id} | Get job |
KeysApi | AddKey | Post /api/v2/keys | Add key |
KeysApi | DeleteKey | Delete /api/v2/keys/{key} | Delete key |
KeysApi | EditKey | Put /api/v2/keys/{key} | Edit key |
KeysApi | GetKey | Get /api/v2/keys/{key} | Get key |
KeysApi | ListKeys | Get /api/v2/keys | List keys |
LocationsApi | GetLocation | Get /api/v2/locations/{location} | Get location |
LocationsApi | ListLocations | Get /api/v2/locations | List locations |
MachinesApi | CloneMachine | Post /api/v2/machines/{machine}/actions/clone | Clone machine |
MachinesApi | Console | Post /api/v2/machines/{machine}/actions/console | Open console |
MachinesApi | CreateMachine | Post /api/v2/machines | Create machine |
MachinesApi | DestroyMachine | Post /api/v2/machines/{machine}/actions/destroy | Destroy machine |
MachinesApi | EditMachine | Put /api/v2/machines/{machine} | Edit machine |
MachinesApi | ExposeMachine | Post /api/v2/machines/{machine}/actions/expose | Expose machine |
MachinesApi | GetMachine | Get /api/v2/machines/{machine} | Get machine |
MachinesApi | ListMachines | Get /api/v2/machines | List machines |
MachinesApi | RebootMachine | Post /api/v2/machines/{machine}/actions/reboot | Reboot machine |
MachinesApi | RenameMachine | Post /api/v2/machines/{machine}/actions/rename | Rename machine |
MachinesApi | ResizeMachine | Post /api/v2/machines/{machine}/actions/resize | Resize machine |
MachinesApi | ResumeMachine | Post /api/v2/machines/{machine}/actions/resume | Resume machine |
MachinesApi | Ssh | Post /api/v2/machines/{machine}/actions/ssh | Open secure shell |
MachinesApi | StartMachine | Post /api/v2/machines/{machine}/actions/start | Start machine |
MachinesApi | StopMachine | Post /api/v2/machines/{machine}/actions/stop | Stop machine |
MachinesApi | SuspendMachine | Post /api/v2/machines/{machine}/actions/suspend | Suspend machine |
MachinesApi | UndefineMachine | Post /api/v2/machines/{machine}/actions/undefine | Undefine machine |
MembersApi | ListOrgMembers | Get /api/v2/orgs/{org}/members | List org members |
NameApi | GetOrg | Get /api/v2/orgs/{org} | Get Org |
NetworksApi | CreateNetwork | Post /api/v2/networks | Create network |
NetworksApi | EditNetwork | Put /api/v2/networks/{network} | Edit network |
NetworksApi | GetNetwork | Get /api/v2/networks/{network} | Get network |
NetworksApi | ListNetworks | Get /api/v2/networks | List networks |
OrgsApi | GetMember | Get /api/v2/orgs/{org}/members/{member} | Get Org |
OrgsApi | GetOrg | Get /api/v2/orgs/{org} | Get Org |
OrgsApi | ListOrgMembers | Get /api/v2/orgs/{org}/members | List org members |
OrgsApi | ListOrgTeams | Get /api/v2/orgs/{org}/teams | List org teams |
OrgsApi | ListOrgs | Get /api/v2/orgs | List orgs |
RulesApi | AddRule | Post /api/v2/rules | Add rule |
RulesApi | DeleteRule | Delete /api/v2/rules/{rule} | Delete rule |
RulesApi | GetRule | Get /api/v2/rules/{rule} | Get rule |
RulesApi | ListRules | Get /api/v2/rules | List rules |
RulesApi | RenameRule | Patch /api/v2/rules/{rule} | Rename rule |
RulesApi | ToggleRule | Put /api/v2/rules/{rule} | Toggle rule |
RulesApi | UpdateRule | Post /api/v2/rules/{rule} | Update rule |
ScriptsApi | DeleteScript | Delete /api/v2/scripts/{script} | Delete script |
ScriptsApi | EditScript | Put /api/v2/scripts/{script} | Edit script |
ScriptsApi | GetScript | Get /api/v2/scripts/{script} | Get script |
ScriptsApi | ListScripts | Get /api/v2/scripts | List scripts |
SizesApi | GetSize | Get /api/v2/sizes/{size} | Get size |
SizesApi | ListSizes | Get /api/v2/sizes | List sizes |
SnapshotsApi | CreateSnapshot | Post /api/v2/machines/{machine}/snapshots | Create snapshot |
SnapshotsApi | ListSnapshots | Get /api/v2/machines/{machine}/snapshots | List machine snapshots |
SnapshotsApi | RemoveSnapshot | Delete /api/v2/machines/{machine}/snapshots/{snapshot} | Remove snapshot |
SnapshotsApi | RevertToSnapshot | Post /api/v2/machines/{machine}/snapshots/{snapshot} | Revert to snapshot |
TeamsApi | ListOrgTeams | Get /api/v2/orgs/{org}/teams | List org teams |
TotalMachineCountApi | GetOrg | Get /api/v2/orgs/{org} | Get Org |
UsersApi | ListUsers | Get /api/v2/users | List users |
VolumesApi | CreateVolume | Post /api/v2/volumes | Create volume |
VolumesApi | DeleteVolume | Delete /api/v2/volumes/{volume} | Delete volume |
VolumesApi | EditVolume | Put /api/v2/volumes/{volume} | Edit volume |
VolumesApi | GetVolume | Get /api/v2/volumes/{volume} | Get volume |
VolumesApi | ListVolumes | Get /api/v2/volumes | List volumes |
ZonesApi | CreateZone | Post /api/v2/zones | Create zone |
ZonesApi | EditZone | Put /api/v2/zones/{zone} | Edit zone |
ZonesApi | GetZone | Get /api/v2/zones/{zone} | Get zone |
ZonesApi | ListZones | Get /api/v2/zones | List zones |
- AddCloudRequest
- AddCloudRequestAllOf
- AddKeyRequest
- AddKeyRequestAnyOf
- AddKeyRequestAnyOf1
- AddKeyRequestAnyOf2
- AddKeyResponse
- AlibabaCloudRequest
- AlibabaCredentials
- AmazonCloudRequest
- AmazonCredentials
- AmazonNet
- AzureCloudRequest
- AzureCredentials
- AzureExtra
- AzureNet
- Cloud
- CloudFeatures
- CloudSigmaCloudRequest
- CloudSigmaCredentials
- CreateMachineRequest
- CreateMachineRequestDisks
- CreateMachineResponse
- CreateMachineResponseOneOf
- CreateMachineResponseOneOf1
- CreateNetworkRequest
- CreateNetworkResponse
- CreateVolumeRequest
- CreateVolumeResponse
- CreateZoneRequest
- CreateZoneResponse
- CronSchedule
- DigitaloceanCloudRequest
- DigitaloceanCredentials
- DockerCloudRequest
- DockerCredentials
- EditCloudRequest
- EditCloudRequestAnyOf
- EquinixCloudRequest
- EquinixCredentials
- EquinixMetalExtra
- EquinixMetalNet
- EquinixMetalNetIpAddresses
- Expiration
- ExpirationNotify
- Frequency
- GetCloudResponse
- GetImageResponse
- GetJobResponse
- GetKeyResponse
- GetLocationResponse
- GetMachineResponse
- GetNetworkResponse
- GetOrgMemberResponse
- GetOrgResponse
- GetRuleResponse
- GetScriptResponse
- GetSizeResponse
- GetVolumeResponse
- GetZoneResponse
- GoogleCloudRequest
- GoogleCredentials
- GoogleNet
- IbmCloudRequest
- IbmCredentials
- Image
- InlineResponse200
- InlineScript
- IntervalSchedule
- Job
- KVMNet
- KVMNetNetworks
- Key
- KubernetesCloudRequest
- KubernetesCredentials
- KubevirtCloudRequest
- KvmCloudRequest
- LinodeCloudRequest
- LinodeCredentials
- LinodeExtra
- LinodeNet
- ListCloudsResponse
- ListImagesResponse
- ListKeysResponse
- ListLocationsResponse
- ListMachinesResponse
- ListNetworksResponse
- ListOrgMembersResponse
- ListOrgTeamsResponse
- ListOrgsResponse
- ListRulesResponse
- ListScriptsResponse
- ListSizesResponse
- ListSnapshotsResponse
- ListUsersResponse
- ListVolumesResponse
- ListZonesResponse
- Location
- Log
- LxdCloudRequest
- LxdCredentials
- Machine
- MachineState
- MaxihostCloudRequest
- MaxihostCredentials
- Member
- Network
- OnappCloudRequest
- OnappCredentials
- OneOffSchedule
- OpenstackCloudRequest
- OpenstackCredentials
- Org
- OtherCloudRequest
- PostDeployScript
- Query
- RackspaceCloudRequest
- RackspaceCredentials
- ResponseMetadata
- Rule
- RuleAction
- Script
- Selector
- Size
- SupportedProviders
- Team
- TriggerAfter
- User
- VcloudCloudRequest
- VcloudCredentials
- Volume
- VsphereCloudRequest
- VsphereCredentials
- VultrCloudRequest
- VultrCredentials
- Window
- Zone
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey
where the key is: Authorization and passed in as the auth context for each request.
- Type: API key
- API key parameter name: session.id
- Location:
Note, each API key must be added to a map of map[string]APIKey
where the key is: session.id and passed in as the auth context for each request.
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