Skip to content

Commit 2a3bb53

Browse files
committed
Fix
1 parent ee36791 commit 2a3bb53

File tree

2 files changed

+18
-62
lines changed

2 files changed

+18
-62
lines changed

Diff for: components/gitpod-protocol/go/gitpod-service.go

+6-35
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ type APIInterface interface {
8484
TrackEvent(ctx context.Context, event *RemoteTrackMessage) (err error)
8585
GetSupportedWorkspaceClasses(ctx context.Context) (res []*SupportedWorkspaceClass, err error)
8686

87-
CreateTeam(ctx context.Context, teamName string) (*Team, error)
88-
GetTeamMembers(ctx context.Context, teamID string) ([]*TeamMemberInfo, error)
89-
JoinTeam(ctx context.Context, teamID string) (*Team, error)
90-
GetGenericInvite(ctx context.Context, teamID string) (*TeamMembershipInvite, error)
87+
CreateTeam(ctx context.Context, params string) (*Team, error)
88+
GetTeamMembers(ctx context.Context, params string) ([]*TeamMemberInfo, error)
89+
JoinTeam(ctx context.Context, params string) (*Team, error)
9190

9291
InstanceUpdates(ctx context.Context, instanceID string) (<-chan *WorkspaceInstance, error)
9392
}
@@ -209,15 +208,6 @@ const (
209208
// FunctionGetSupportedWorkspaceClasses is the name of the getSupportedWorkspaceClasses function
210209
FunctionGetSupportedWorkspaceClasses FunctionName = "getSupportedWorkspaceClasses"
211210

212-
// FunctionCreateTeam is the name of the createTeam function
213-
FunctionCreateTeam FunctionName = "createTeam"
214-
// FunctionJoinTeam is the name of the joinTeam function
215-
FunctionJoinTeam FunctionName = "joinTeam"
216-
// FunctionGetTeamMembers is the name of the getTeamMembers function
217-
FunctionGetTeamMembers FunctionName = "getTeamMembers"
218-
// FunctionGetGenericInvite is the name of the getGenericInvite function
219-
FunctionGetGenericInvite FunctionName = "getGenericInvite"
220-
221211
// FunctionOnInstanceUpdate is the name of the onInstanceUpdate callback function
222212
FunctionOnInstanceUpdate = "onInstanceUpdate"
223213
)
@@ -1402,7 +1392,7 @@ func (gp *APIoverJSONRPC) CreateTeam(ctx context.Context, teamName string) (res
14021392
return
14031393
}
14041394
_params := []interface{}{teamName}
1405-
err = gp.C.Call(ctx, string(FunctionCreateTeam), _params, &res)
1395+
err = gp.C.Call(ctx, "createTeam", _params, &res)
14061396
return
14071397
}
14081398

@@ -1412,7 +1402,7 @@ func (gp *APIoverJSONRPC) GetTeamMembers(ctx context.Context, teamID string) (re
14121402
return
14131403
}
14141404
_params := []interface{}{teamID}
1415-
err = gp.C.Call(ctx, string(FunctionGetTeamMembers), _params, &res)
1405+
err = gp.C.Call(ctx, "getTeamMembers", _params, &res)
14161406
return
14171407
}
14181408

@@ -1422,17 +1412,7 @@ func (gp *APIoverJSONRPC) JoinTeam(ctx context.Context, inviteID string) (res *T
14221412
return
14231413
}
14241414
_params := []interface{}{inviteID}
1425-
err = gp.C.Call(ctx, string(FunctionJoinTeam), _params, &res)
1426-
return
1427-
}
1428-
1429-
func (gp *APIoverJSONRPC) GetGenericInvite(ctx context.Context, teamID string) (res *TeamMembershipInvite, err error) {
1430-
if gp == nil {
1431-
err = errNotConnected
1432-
return
1433-
}
1434-
_params := []interface{}{teamID}
1435-
err = gp.C.Call(ctx, string(FunctionGetGenericInvite), _params, &res)
1415+
err = gp.C.Call(ctx, "joinTeam", _params, &res)
14361416
return
14371417
}
14381418

@@ -2151,12 +2131,3 @@ type TeamMemberInfo struct {
21512131
Role TeamMemberRole `json:"role,omitempty"`
21522132
MemberSince string `json:"memberSince,omitempty"`
21532133
}
2154-
2155-
type TeamMembershipInvite struct {
2156-
ID string `json:"id,omitempty"`
2157-
TeamID string `json:"teamId,omitempty"`
2158-
Role TeamMemberRole `json:"role,omitempty"`
2159-
CreationTime string `json:"creationTime,omitempty"`
2160-
InvalidationTime string `json:"invalidationTime,omitempty"`
2161-
InvitedEmail string `json:"invitedEmail,omitempty"`
2162-
}

Diff for: components/gitpod-protocol/go/mock.go

+12-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)