mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
* [papi] Add `verified` flag to config and `ActivateClientConfig` to OIDC service * [papi] implement `ActivateClientConfig` * [gitpod-db/go] add `setClientConfigVerifiedFlag` * [gitpod-db/migration] add `d_b_oidc_client_config.verified` field * [papi] Don't deactive on UpdateClientConfig * [gitpod-db/go] add missing `Verified` field * On "activate" request also mark as verified. * [gitpod-db/go] fix mapping of `Verified` field * [papi] ensure only verified OIDC client configs can be activated * [papi] Skip the sign-in on verify-only requests. * [papi] fix skipped tests * [papi] fix mapping of OIDC configs * rename RPC method * fix tests after adding validation of claims * fix: activation of record should deactivate others * fix: update should unverify the entry * remove Debug() * [db-migration] fix: mark active entries as verified
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.