Skip to content

Commit 2fef159

Browse files
Laurie T. Malauroboquat
authored andcommitted
[public api] Wire up UnimplementedTokensService
1 parent c7af42a commit 2fef159

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2+
// Licensed under the GNU Affero General Public License (AGPL).
3+
// See License-AGPL.txt in the project root for license information.
4+
5+
package apiv1
6+
7+
import "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1/v1connect"
8+
9+
func NewTokensService() *TokensService {
10+
return &TokensService{}
11+
}
12+
13+
type TokensService struct {
14+
v1connect.UnimplementedTokensServiceHandler
15+
}

components/public-api-server/pkg/server/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ func register(srv *baseserver.Server, connPool proxy.ServerConnectionPool) error
104104
teamsRoute, teamsServiceHandler := v1connect.NewTeamsServiceHandler(apiv1.NewTeamsService(connPool), handlerOptions...)
105105
srv.HTTPMux().Handle(teamsRoute, teamsServiceHandler)
106106

107+
tokensRoute, tokensServiceHandler := v1connect.NewTokensServiceHandler(apiv1.NewTokensService(), handlerOptions...)
108+
srv.HTTPMux().Handle(tokensRoute, tokensServiceHandler)
109+
107110
return nil
108111
}
109112

0 commit comments

Comments
 (0)