Skip to content

Commit ede1bce

Browse files
easyCZroboquat
authored andcommitted
[gitpod-protocol] Add support for getTeams to golang client
1 parent 6fd748c commit ede1bce

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

components/gitpod-protocol/go/gitpod-service.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ type APIInterface interface {
8484
TrackEvent(ctx context.Context, event *RemoteTrackMessage) (err error)
8585
GetSupportedWorkspaceClasses(ctx context.Context) (res []*SupportedWorkspaceClass, err error)
8686

87+
GetTeams(ctx context.Context) ([]*Team, error)
8788
CreateTeam(ctx context.Context, teamName string) (*Team, error)
8889
GetTeamMembers(ctx context.Context, teamID string) ([]*TeamMemberInfo, error)
8990
JoinTeam(ctx context.Context, teamID string) (*Team, error)
@@ -209,6 +210,8 @@ const (
209210
// FunctionGetSupportedWorkspaceClasses is the name of the getSupportedWorkspaceClasses function
210211
FunctionGetSupportedWorkspaceClasses FunctionName = "getSupportedWorkspaceClasses"
211212

213+
// FunctionGetTeams is the name of the getTeams function
214+
FunctionGetTeams FunctionName = "getTeams"
212215
// FunctionCreateTeam is the name of the createTeam function
213216
FunctionCreateTeam FunctionName = "createTeam"
214217
// FunctionJoinTeam is the name of the joinTeam function
@@ -1396,6 +1399,16 @@ func (gp *APIoverJSONRPC) GetSupportedWorkspaceClasses(ctx context.Context) (res
13961399
return
13971400
}
13981401

1402+
func (gp *APIoverJSONRPC) GetTeams(ctx context.Context) (res []*Team, err error) {
1403+
if gp == nil {
1404+
err = errNotConnected
1405+
return
1406+
}
1407+
_params := []interface{}{}
1408+
err = gp.C.Call(ctx, string(FunctionGetTeams), _params, &res)
1409+
return
1410+
}
1411+
13991412
func (gp *APIoverJSONRPC) CreateTeam(ctx context.Context, teamName string) (res *Team, err error) {
14001413
if gp == nil {
14011414
err = errNotConnected

components/gitpod-protocol/go/mock.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)