# README
Go API client for openapi
Universe.sh houston API
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.0.0
- 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 "./openapi"
Documentation for API Endpoints
All URIs are relative to http://api-houston-$.endpoints.$.cloud.goog
Class | Method | HTTP request | Description |
---|---|---|---|
AccountApi | ListAccount | Get /v1/account | |
EventsApi | AddEvents | Post /v1/events | |
EventsApi | ListEvents | Get /v1/events | |
EventsApi | ReadEvent | Get /v1/events/{event} | |
SatellitesApi | AddPools | Post /v1/satellites/{cloud}/{satellite}/pools | |
SatellitesApi | AddSatellites | Post /v1/satellites/{cloud} | |
SatellitesApi | CreateMetrics | Post /v1/satellites/{cloud}/{satellite}/{pool}/metrics | |
SatellitesApi | DeletePool | Delete /v1/satellites/{cloud}/{satellite}/{pool} | |
SatellitesApi | DeleteSatellite | Delete /v1/satellites/{cloud}/{satellite} | |
SatellitesApi | ListMetrics | Get /v1/satellites/{cloud}/{satellite}/{pool}/metrics | |
SatellitesApi | ListPools | Get /v1/satellites/{cloud}/{satellite}/pools | |
SatellitesApi | ListSatellites | Get /v1/satellites/{cloud} | |
SatellitesApi | ReadPool | Get /v1/satellites/{cloud}/{satellite}/{pool} | |
SatellitesApi | ReadSatellite | Get /v1/satellites/{cloud}/{satellite} | |
SatellitesApi | UpdatePool | Put /v1/satellites/{cloud}/{satellite}/{pool} | |
SatellitesApi | UpdateSatellite | Put /v1/satellites/{cloud}/{satellite} | |
TeamsApi | AddTeams | Post /v1/teams | |
TeamsApi | DeleteInvitations | Delete /v1/teams/invitations/{invitation} | |
TeamsApi | DeleteTeam | Delete /v1/teams/{team} | |
TeamsApi | ListInvitations | Get /v1/teams/{team}/invitations | |
TeamsApi | ListInvoices | Get /v1/teams/{team}/invoices | |
TeamsApi | ListTeams | Get /v1/teams | |
TeamsApi | ReadInvitations | Get /v1/teams/invitations/{invitation} | |
TeamsApi | ReadInvitationsAccept | Get /v1/teams/invitations/{invitation}/accept | |
TeamsApi | ReadInvoice | Get /v1/teams/{team}/invoices/{invoice} | |
TeamsApi | ReadPreferences | Get /v1/teams/{team}/preferences | |
TeamsApi | ReadTeam | Get /v1/teams/{team} | |
TeamsApi | UpdateInvitations | Put /v1/teams/invitations/{invitation} | |
TeamsApi | UpdatePreferences | Put /v1/teams/{team}/preferences | |
TeamsApi | UpdateTeam | Put /v1/teams/{team} |
Documentation For Models
- Account
- AccountDefaultTeam
- Event
- Generic
- Invitation
- InvitationInvitedBy
- InvitationTeam
- InvitationUser
- Invoice
- Metric
- MetricData
- Pool
- PoolAutoscaling
- PoolLaunchSpecification
- PoolLaunchSpecificationConfig
- PoolLaunchSpecificationRootDisk
- Preferences
- Satellite
- Team
- TeamUsers
Documentation For Authorization
okta_jwt
- Type: OAuth
- Flow: implicit
- Authorization URL:
- Scopes: N/A
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Author
# Functions
CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResonse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewConfiguration returns a new Configuration object.
# Variables
ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKey takes an APIKey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
# Structs
Account struct for Account.
AccountDefaultTeam struct for AccountDefaultTeam.
APIClient manages communication with the Universe.sh houston API API v1.0.0 In most cases there should be only one, shared, APIClient.
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
APIResponse stores the API response returned by the server.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
Configuration stores the configuration of the API client.
Event struct for Event.
Generic struct for Generic.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
Invitation struct for Invitation.
InvitationInvitedBy struct for InvitationInvitedBy.
InvitationTeam struct for InvitationTeam.
InvitationUser struct for InvitationUser.
Invoice struct for Invoice.
Metric struct for Metric.
MetricData struct for MetricData.
Pool struct for Pool.
PoolAutoscaling struct for PoolAutoscaling.
PoolLaunchSpecification struct for PoolLaunchSpecification.
PoolLaunchSpecificationConfig struct for PoolLaunchSpecificationConfig.
PoolLaunchSpecificationRootDisk struct for PoolLaunchSpecificationRootDisk.
Preferences struct for Preferences.
Satellite struct for Satellite.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.
Team struct for Team.
TeamUsers struct for TeamUsers.
# Type aliases
AccountApiService AccountApi service.
EventsApiService EventsApi service.
SatellitesApiService SatellitesApi service.
TeamsApiService TeamsApi service.