mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
* redirect in the offline case * [public-api] generate noise * [server] Refactor Prebuild resolution to happen in a single place * [dashboard, api] Show Prebuild details * fixup! [server] Refactor Prebuild resolution to happen in a single place * [bridge] Revive Prebuild QUEUED state: it's everything before running * [server] Fix dead-end for streaming logs when starting too early * [dashboard] Adds SHA + duration, fix re-rendering when prebuildId changes, and uses the new/old streaming logic WIP because still has the "duplicate (sometimes triple!) logs" react re-rendering issue * Prevent unnecessary re-renders of task output * remove double-comment * Duration display improvements * Properly dismiss toasts and render durations * Remove SHA from prebuild list * Clean up and implement the `reset` event for workspace logs * fix comment * Tiny cleanup --------- Co-authored-by: Filip Troníček <filip@gitpod.io>
Golang bindings for Gitpod API
This package contains API definitions and client bindings for interacting with Gitpod API.
Usage
go get -u github.com/gitpod-io/gitpod/components/public-api/go
import (
"context"
"fmt"
"os"
"time"
"github.com/bufbuild/connect-go"
"github.com/gitpod-io/gitpod/components/public-api/go/client"
v1 "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1"
)
func ExampleListTeams() {
token := "gitpod_pat_example.personal-access-token"
gitpod, err := client.New(client.WithCredentials(token))
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to construct gitpod client %v", err)
return
}
response, err := gitpod.Teams.ListTeams(context.Background(), connect.NewRequest(&v1.ListTeamsRequest{}))
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to list teams %v", err)
return
}
fmt.Fprintf(os.Stdout, "Retrieved teams %v", response.Msg.GetTeams())
}
For more examples, see examples directory.