Skip to content

Commit dfda855

Browse files
committed
Embed the Unimplemented implementation
1 parent 1569e1a commit dfda855

File tree

17 files changed

+271
-16
lines changed

17 files changed

+271
-16
lines changed

components/content-service/pkg/service/blob-service.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
type BlobService struct {
2323
cfg storage.Config
2424
s storage.PresignedAccess
25+
26+
api.UnimplementedBlobServiceServer
2527
}
2628

2729
// NewBlobService create a new content service
@@ -30,7 +32,7 @@ func NewBlobService(cfg storage.Config) (res *BlobService, err error) {
3032
if err != nil {
3133
return nil, err
3234
}
33-
return &BlobService{cfg, s}, nil
35+
return &BlobService{cfg: cfg, s: s}, nil
3436
}
3537

3638
// UploadUrl provides a upload URL

components/content-service/pkg/service/content-service.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ package service
77
import (
88
"context"
99

10+
"github.com/opentracing/opentracing-go"
11+
"google.golang.org/grpc/codes"
12+
"google.golang.org/grpc/status"
13+
1014
"github.com/gitpod-io/gitpod/common-go/log"
1115
"github.com/gitpod-io/gitpod/common-go/tracing"
1216
"github.com/gitpod-io/gitpod/content-service/api"
1317
"github.com/gitpod-io/gitpod/content-service/pkg/storage"
14-
"github.com/opentracing/opentracing-go"
15-
"google.golang.org/grpc/codes"
16-
"google.golang.org/grpc/status"
1718
)
1819

1920
// ContentService implements ContentServiceServer
2021
type ContentService struct {
2122
cfg storage.Config
2223
s storage.PresignedAccess
24+
25+
api.UnimplementedContentServiceServer
2326
}
2427

2528
// NewContentService create a new content service
@@ -28,7 +31,7 @@ func NewContentService(cfg storage.Config) (res *ContentService, err error) {
2831
if err != nil {
2932
return nil, err
3033
}
31-
return &ContentService{cfg, s}, nil
34+
return &ContentService{cfg: cfg, s: s}, nil
3235
}
3336

3437
// DeleteUserContent deletes all content associated with a user.

components/content-service/pkg/service/ideplugin-service.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ package service
77
import (
88
"context"
99

10+
"github.com/opentracing/opentracing-go"
11+
"google.golang.org/grpc/codes"
12+
"google.golang.org/grpc/status"
13+
1014
"github.com/gitpod-io/gitpod/common-go/log"
1115
"github.com/gitpod-io/gitpod/common-go/tracing"
1216
"github.com/gitpod-io/gitpod/content-service/api"
1317
"github.com/gitpod-io/gitpod/content-service/pkg/storage"
14-
"github.com/opentracing/opentracing-go"
15-
"google.golang.org/grpc/codes"
16-
"google.golang.org/grpc/status"
1718
)
1819

1920
// IDEPluginService implements IDEPluginServiceServer
2021
type IDEPluginService struct {
2122
cfg storage.Config
2223
s storage.PresignedAccess
24+
25+
api.UnimplementedIDEPluginServiceServer
2326
}
2427

2528
// NewIDEPluginService create a new IDE plugin service
@@ -28,7 +31,7 @@ func NewIDEPluginService(cfg storage.Config) (res *IDEPluginService, err error)
2831
if err != nil {
2932
return nil, err
3033
}
31-
return &IDEPluginService{cfg, s}, nil
34+
return &IDEPluginService{cfg: cfg, s: s}, nil
3235
}
3336

3437
// UploadURL provides a URL to which clients can upload the content via HTTP PUT.

components/content-service/pkg/service/workspace-service.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ import (
88
"context"
99
"strings"
1010

11+
"github.com/opentracing/opentracing-go"
12+
"google.golang.org/grpc/codes"
13+
"google.golang.org/grpc/status"
14+
1115
"github.com/gitpod-io/gitpod/common-go/log"
1216
"github.com/gitpod-io/gitpod/common-go/tracing"
1317
"github.com/gitpod-io/gitpod/content-service/api"
1418
"github.com/gitpod-io/gitpod/content-service/pkg/storage"
15-
"github.com/opentracing/opentracing-go"
16-
"google.golang.org/grpc/codes"
17-
"google.golang.org/grpc/status"
1819
)
1920

2021
// WorkspaceService implements WorkspaceServiceServer
2122
type WorkspaceService struct {
2223
cfg storage.Config
2324
s storage.PresignedAccess
25+
26+
api.UnimplementedWorkspaceServiceServer
2427
}
2528

2629
// NewWorkspaceService create a new content service
@@ -29,7 +32,7 @@ func NewWorkspaceService(cfg storage.Config) (res *WorkspaceService, err error)
2932
if err != nil {
3033
return nil, err
3134
}
32-
return &WorkspaceService{cfg, s}, nil
35+
return &WorkspaceService{cfg: cfg, s: s}, nil
3336
}
3437

3538
// WorkspaceDownloadURL provides a URL from where the content of a workspace can be downloaded from

components/image-builder-api/go/mock/mock.go

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

components/image-builder/pkg/builder/builder.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ type DockerBuilder struct {
8080
imgExistsCache map[string]struct{}
8181

8282
gc *GarbageCollector
83+
84+
api.UnimplementedImageBuilderServer
8385
}
8486

8587
// Start iniitializes the docker builder and starts its maintainance functions. This function must be called prior to calling

components/supervisor/pkg/supervisor/notification.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ import (
88
"context"
99
"sync"
1010

11-
"github.com/gitpod-io/gitpod/common-go/log"
12-
"github.com/gitpod-io/gitpod/supervisor/api"
1311
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
1412
"google.golang.org/grpc"
1513
"google.golang.org/grpc/codes"
1614
"google.golang.org/grpc/status"
15+
16+
"github.com/gitpod-io/gitpod/common-go/log"
17+
"github.com/gitpod-io/gitpod/supervisor/api"
1718
)
1819

1920
const (
@@ -36,6 +37,8 @@ type NotificationService struct {
3637
subscriptions map[uint64]*subscription
3738
nextNotificationID uint64
3839
pendingNotifications map[uint64]*pendingNotification
40+
41+
api.UnimplementedNotificationServiceServer
3942
}
4043

4144
type pendingNotification struct {

components/supervisor/pkg/supervisor/services.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ type statusService struct {
8181
Ports *ports.Manager
8282
Tasks *tasksManager
8383
ideReady *ideReadyState
84+
85+
api.UnimplementedStatusServiceServer
8486
}
8587

8688
func (s *statusService) RegisterGRPC(srv *grpc.Server) {
@@ -220,6 +222,8 @@ func (s *statusService) TasksStatus(req *api.TasksStatusRequest, srv api.StatusS
220222
// RegistrableTokenService can register the token service
221223
type RegistrableTokenService struct {
222224
Service api.TokenServiceServer
225+
226+
api.UnimplementedTokenServiceServer
223227
}
224228

225229
// RegisterGRPC registers a gRPC service
@@ -297,6 +301,8 @@ type InMemoryTokenService struct {
297301
token map[string][]*Token
298302
provider map[string][]tokenProvider
299303
mu sync.RWMutex
304+
305+
api.UnimplementedTokenServiceServer
300306
}
301307

302308
// GetToken returns a token for a host
@@ -560,6 +566,8 @@ func (rt *remoteTokenProvider) GetToken(ctx context.Context, req *api.GetTokenRe
560566
type InfoService struct {
561567
cfg *Config
562568
ContentState ContentState
569+
570+
api.UnimplementedInfoServiceServer
563571
}
564572

565573
// RegisterGRPC registers the gRPC info service
@@ -625,6 +633,8 @@ func (is *InfoService) WorkspaceInfo(context.Context, *api.WorkspaceInfoRequest)
625633
// ControlService implements the supervisor control service
626634
type ControlService struct {
627635
portsManager *ports.Manager
636+
637+
api.UnimplementedControlServiceServer
628638
}
629639

630640
// RegisterGRPC registers the gRPC info service

components/supervisor/pkg/supervisor/supervisor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func Run(options ...RunOption) {
162162
ideReady: ideReady,
163163
},
164164
termMuxSrv,
165-
RegistrableTokenService{tokenService},
165+
RegistrableTokenService{Service: tokenService},
166166
notificationService,
167167
&InfoService{cfg: cfg, ContentState: cstate},
168168
&ControlService{portsManager: portMgmt},

components/supervisor/pkg/terminal/service.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ type MuxTerminalService struct {
5050
DefaultWorkdir string
5151
DefaultShell string
5252
Env []string
53+
54+
api.UnimplementedTerminalServiceServer
5355
}
5456

5557
// RegisterGRPC registers a gRPC service

0 commit comments

Comments
 (0)