Skip to content

Commit 4f9afc9

Browse files
committed
Embed the Unimplemented implementation
1 parent 5b1721f commit 4f9afc9

File tree

18 files changed

+56
-29
lines changed

18 files changed

+56
-29
lines changed

components/content-service-api/go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/gitpod-io/gitpod/content-service/api
33
go 1.16
44

55
require (
6-
github.com/golang/protobuf v1.4.3
6+
github.com/golang/protobuf v1.4.3 // indirect
77
github.com/opencontainers/go-digest v1.0.0
88
github.com/opencontainers/image-spec v1.0.1
99
google.golang.org/grpc v1.36.0

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/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.16
55
require (
66
github.com/gitpod-io/gitpod/content-service/api v0.0.0-00010101000000-000000000000
77
github.com/golang/mock v1.5.0
8-
github.com/golang/protobuf v1.4.3
98
google.golang.org/grpc v1.36.0
109
google.golang.org/protobuf v1.25.0
1110
)

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

components/ws-daemon-api/go/go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ module github.com/gitpod-io/gitpod/ws-daemon/api
33
go 1.16
44

55
require (
6-
github.com/fatih/gomodifytags v1.13.0 // indirect
76
github.com/gitpod-io/gitpod/content-service/api v0.0.0-00010101000000-000000000000
87
github.com/golang/mock v1.5.0
9-
github.com/golang/protobuf v1.4.3
108
google.golang.org/grpc v1.36.0
119
google.golang.org/protobuf v1.25.0
1210
)

components/ws-daemon-api/go/go.sum

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
88
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
99
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
1010
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
11-
github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
12-
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
13-
github.com/fatih/gomodifytags v1.13.0 h1:fmhwoecjZ5c34Q2chjRB9cL8Rgag+1TOSMy+grissMc=
14-
github.com/fatih/gomodifytags v1.13.0/go.mod h1:TbUyEjH1Zo0GkJd2Q52oVYqYcJ0eGNqG8bsiOb75P9c=
15-
github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
16-
github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
1711
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
1812
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
1913
github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g=
@@ -68,12 +62,10 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5
6862
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
6963
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
7064
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
71-
golang.org/x/tools v0.0.0-20180824175216-6c1c5e93cdc1/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
7265
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
7366
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
7467
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
7568
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
76-
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e h1:aZzprAO9/8oim3qStq3wc1Xuxx4QmAGriC4VU4ojemQ=
7769
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
7870
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
7971
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

components/ws-daemon-api/go/mock/mock.go

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ type WorkspaceService struct {
4646
stopService context.CancelFunc
4747
sandboxes quota.SandboxProvider
4848
runtime container.Runtime
49+
50+
api.UnimplementedInWorkspaceServiceServer
51+
api.UnimplementedWorkspaceContentServiceServer
4952
}
5053

5154
// WorkspaceExistenceCheck is a check that can determine if a workspace container currently exists on this node.

components/ws-daemon/pkg/iws/iws.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ type InWorkspaceServiceServer struct {
120120

121121
srv *grpc.Server
122122
sckt io.Closer
123+
124+
api.UnimplementedInWorkspaceServiceServer
123125
}
124126

125127
// Start creates the syscall socket the IWS server listens on, and starts the gRPC server on it

components/ws-manager-api/go/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.16
55
require (
66
github.com/gitpod-io/gitpod/content-service/api v0.0.0-00010101000000-000000000000
77
github.com/golang/mock v1.5.0
8-
github.com/golang/protobuf v1.4.3
98
google.golang.org/grpc v1.36.0
109
google.golang.org/protobuf v1.25.0
1110
)

components/ws-manager/pkg/manager/manager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ type Manager struct {
6363
subscriberLock sync.RWMutex
6464

6565
metrics *metrics
66+
67+
api.UnimplementedWorkspaceManagerServer
68+
regapi.UnimplementedSpecProviderServer
6669
}
6770

6871
type startWorkspaceContext struct {

0 commit comments

Comments
 (0)