Path: blob/main/components/public-api/go/experimental/v1/v1connect/identityprovider.connect.go
2501 views
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34// Code generated by protoc-gen-connect-go. DO NOT EDIT.5//6// Source: gitpod/experimental/v1/identityprovider.proto78package v1connect910import (11context "context"12errors "errors"13connect_go "github.com/bufbuild/connect-go"14v1 "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1"15http "net/http"16strings "strings"17)1819// This is a compile-time assertion to ensure that this generated file and the connect package are20// compatible. If you get a compiler error that this constant is not defined, this code was21// generated with a version of connect newer than the one compiled into your binary. You can fix the22// problem by either regenerating this code with an older version of connect or updating the connect23// version compiled into your binary.24const _ = connect_go.IsAtLeastVersion0_1_02526const (27// IdentityProviderServiceName is the fully-qualified name of the IdentityProviderService service.28IdentityProviderServiceName = "gitpod.experimental.v1.IdentityProviderService"29)3031// IdentityProviderServiceClient is a client for the gitpod.experimental.v1.IdentityProviderService32// service.33type IdentityProviderServiceClient interface {34// GetIDToken produces a new OIDC ID token (https://openid.net/specs/openid-connect-core-1_0.html#ImplicitIDToken)35GetIDToken(context.Context, *connect_go.Request[v1.GetIDTokenRequest]) (*connect_go.Response[v1.GetIDTokenResponse], error)36}3738// NewIdentityProviderServiceClient constructs a client for the39// gitpod.experimental.v1.IdentityProviderService service. By default, it uses the Connect protocol40// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To41// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb()42// options.43//44// The URL supplied here should be the base URL for the Connect or gRPC server (for example,45// http://api.acme.com or https://acme.com/grpc).46func NewIdentityProviderServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) IdentityProviderServiceClient {47baseURL = strings.TrimRight(baseURL, "/")48return &identityProviderServiceClient{49getIDToken: connect_go.NewClient[v1.GetIDTokenRequest, v1.GetIDTokenResponse](50httpClient,51baseURL+"/gitpod.experimental.v1.IdentityProviderService/GetIDToken",52opts...,53),54}55}5657// identityProviderServiceClient implements IdentityProviderServiceClient.58type identityProviderServiceClient struct {59getIDToken *connect_go.Client[v1.GetIDTokenRequest, v1.GetIDTokenResponse]60}6162// GetIDToken calls gitpod.experimental.v1.IdentityProviderService.GetIDToken.63func (c *identityProviderServiceClient) GetIDToken(ctx context.Context, req *connect_go.Request[v1.GetIDTokenRequest]) (*connect_go.Response[v1.GetIDTokenResponse], error) {64return c.getIDToken.CallUnary(ctx, req)65}6667// IdentityProviderServiceHandler is an implementation of the68// gitpod.experimental.v1.IdentityProviderService service.69type IdentityProviderServiceHandler interface {70// GetIDToken produces a new OIDC ID token (https://openid.net/specs/openid-connect-core-1_0.html#ImplicitIDToken)71GetIDToken(context.Context, *connect_go.Request[v1.GetIDTokenRequest]) (*connect_go.Response[v1.GetIDTokenResponse], error)72}7374// NewIdentityProviderServiceHandler builds an HTTP handler from the service implementation. It75// returns the path on which to mount the handler and the handler itself.76//77// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf78// and JSON codecs. They also support gzip compression.79func NewIdentityProviderServiceHandler(svc IdentityProviderServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {80mux := http.NewServeMux()81mux.Handle("/gitpod.experimental.v1.IdentityProviderService/GetIDToken", connect_go.NewUnaryHandler(82"/gitpod.experimental.v1.IdentityProviderService/GetIDToken",83svc.GetIDToken,84opts...,85))86return "/gitpod.experimental.v1.IdentityProviderService/", mux87}8889// UnimplementedIdentityProviderServiceHandler returns CodeUnimplemented from all methods.90type UnimplementedIdentityProviderServiceHandler struct{}9192func (UnimplementedIdentityProviderServiceHandler) GetIDToken(context.Context, *connect_go.Request[v1.GetIDTokenRequest]) (*connect_go.Response[v1.GetIDTokenResponse], error) {93return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.experimental.v1.IdentityProviderService.GetIDToken is not implemented"))94}959697