diff --git a/components/gitpod-protocol/go/gitpod-service.go b/components/gitpod-protocol/go/gitpod-service.go index 7cb8355f24a2e2..a0a785f465502c 100644 --- a/components/gitpod-protocol/go/gitpod-service.go +++ b/components/gitpod-protocol/go/gitpod-service.go @@ -11,6 +11,7 @@ import ( "encoding/json" "errors" "fmt" + "io" "net/http" "net/url" "sync" @@ -23,6 +24,8 @@ import ( // APIInterface wraps the type APIInterface interface { + io.Closer + GetOwnerToken(ctx context.Context, workspaceID string) (res string, err error) AdminBlockUser(ctx context.Context, req *AdminBlockUserRequest) (err error) GetLoggedInUser(ctx context.Context) (res *User, err error) diff --git a/components/gitpod-protocol/go/mock.go b/components/gitpod-protocol/go/mock.go index 7c021145e59e2b..df21918fa59b9b 100644 --- a/components/gitpod-protocol/go/mock.go +++ b/components/gitpod-protocol/go/mock.go @@ -67,6 +67,20 @@ func (mr *MockAPIInterfaceMockRecorder) AdminBlockUser(ctx, req interface{}) *go return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminBlockUser", reflect.TypeOf((*MockAPIInterface)(nil).AdminBlockUser), ctx, req) } +// Close mocks base method. +func (m *MockAPIInterface) Close() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Close") + ret0, _ := ret[0].(error) + return ret0 +} + +// Close indicates an expected call of Close. +func (mr *MockAPIInterfaceMockRecorder) Close() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPIInterface)(nil).Close)) +} + // ClosePort mocks base method. func (m *MockAPIInterface) ClosePort(ctx context.Context, workspaceID string, port float32) error { m.ctrl.T.Helper()