repositorypackage
0.1.0
Repository: https://github.com/universe-sh/client-go.git
Documentation: pkg.go.dev
# 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)