Skip to content

Commit debb16b

Browse files
easyCZroboquat
authored andcommitted
[gitpod-protocol] Add support for getTeam in golang client
1 parent 87485bf commit debb16b

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+
GetTeam(ctx context.Context, teamID string) (*Team, error)
8788
GetTeams(ctx context.Context) ([]*Team, error)
8889
CreateTeam(ctx context.Context, teamName string) (*Team, error)
8990
GetTeamMembers(ctx context.Context, teamID string) ([]*TeamMemberInfo, error)
@@ -210,6 +211,8 @@ const (
210211
// FunctionGetSupportedWorkspaceClasses is the name of the getSupportedWorkspaceClasses function
211212
FunctionGetSupportedWorkspaceClasses FunctionName = "getSupportedWorkspaceClasses"
212213

214+
// FunctionGetTeam is the name of the getTeam function
215+
FunctionGetTeam FunctionName = "getTeam"
213216
// FunctionGetTeams is the name of the getTeams function
214217
FunctionGetTeams FunctionName = "getTeams"
215218
// FunctionCreateTeam is the name of the createTeam function
@@ -1399,6 +1402,16 @@ func (gp *APIoverJSONRPC) GetSupportedWorkspaceClasses(ctx context.Context) (res
13991402
return
14001403
}
14011404

1405+
func (gp *APIoverJSONRPC) GetTeam(ctx context.Context, teamID string) (res *Team, err error) {
1406+
if gp == nil {
1407+
err = errNotConnected
1408+
return
1409+
}
1410+
_params := []interface{}{teamID}
1411+
err = gp.C.Call(ctx, string(FunctionGetTeam), _params, &res)
1412+
return
1413+
}
1414+
14021415
func (gp *APIoverJSONRPC) GetTeams(ctx context.Context) (res []*Team, err error) {
14031416
if gp == nil {
14041417
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)