Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Mazurskiy <mmazurskiy@gitlab.com>2021-04-23 13:41:31 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-06-11 09:11:14 +0300
commit58e7bd4be15c69f9bac3ff5a407e53f9f08a1f90 (patch)
tree20e0c458b085640c89d9bc2d51563008db6237be
parente3cd1aa63e59f6d4c7c323c64dba3fd29fe2c3b8 (diff)
Embed Unimplemented* structs
-rw-r--r--client/dial_test.go2
-rw-r--r--cmd/gitaly-hooks/hooks_test.go1
-rw-r--r--internal/gitaly/service/blob/server.go1
-rw-r--r--internal/gitaly/service/cleanup/server.go1
-rw-r--r--internal/gitaly/service/commit/server.go1
-rw-r--r--internal/gitaly/service/conflicts/server.go1
-rw-r--r--internal/gitaly/service/diff/server.go1
-rw-r--r--internal/gitaly/service/hook/server.go1
-rw-r--r--internal/gitaly/service/internalgitaly/server.go1
-rw-r--r--internal/gitaly/service/namespace/server.go1
-rw-r--r--internal/gitaly/service/objectpool/server.go1
-rw-r--r--internal/gitaly/service/operations/server.go2
-rw-r--r--internal/gitaly/service/ref/server.go1
-rw-r--r--internal/gitaly/service/remote/server.go1
-rw-r--r--internal/gitaly/service/repository/server.go1
-rw-r--r--internal/gitaly/service/server/server.go1
-rw-r--r--internal/gitaly/service/smarthttp/server.go1
-rw-r--r--internal/gitaly/service/ssh/server.go1
-rw-r--r--internal/gitaly/service/wiki/server.go1
-rw-r--r--internal/gitaly/transaction/manager_test.go1
-rw-r--r--internal/helper/chunk/chunker_test.go4
-rw-r--r--internal/middleware/cache/cache_test.go1
-rw-r--r--internal/middleware/limithandler/testhelper_test.go3
-rw-r--r--internal/praefect/grpc-proxy/proxy/helper_test.go1
-rw-r--r--internal/praefect/middleware/errorhandler_test.go4
-rw-r--r--internal/praefect/mocksvc_test.go1
-rw-r--r--internal/praefect/server_test.go1
-rw-r--r--internal/praefect/service/info/server.go1
-rw-r--r--internal/praefect/service/server/server.go1
-rw-r--r--internal/praefect/service/transaction/server.go1
30 files changed, 36 insertions, 4 deletions
diff --git a/client/dial_test.go b/client/dial_test.go
index a931987ae..4399cdfb3 100644
--- a/client/dial_test.go
+++ b/client/dial_test.go
@@ -147,7 +147,7 @@ func TestDial(t *testing.T) {
}
type testSvc struct {
- proxytestdata.TestServiceServer
+ proxytestdata.UnimplementedTestServiceServer
PingMethod func(context.Context, *proxytestdata.PingRequest) (*proxytestdata.PingResponse, error)
PingStreamMethod func(stream proxytestdata.TestService_PingStreamServer) error
}
diff --git a/cmd/gitaly-hooks/hooks_test.go b/cmd/gitaly-hooks/hooks_test.go
index 55b1d22a3..496d1cd67 100644
--- a/cmd/gitaly-hooks/hooks_test.go
+++ b/cmd/gitaly-hooks/hooks_test.go
@@ -576,6 +576,7 @@ func runHookServiceServer(t *testing.T, cfg config.Cfg) {
}
type featureFlagAsserter struct {
+ gitalypb.UnimplementedHookServiceServer
t testing.TB
wrapped gitalypb.HookServiceServer
}
diff --git a/internal/gitaly/service/blob/server.go b/internal/gitaly/service/blob/server.go
index 1bcac3c99..fc826c359 100644
--- a/internal/gitaly/service/blob/server.go
+++ b/internal/gitaly/service/blob/server.go
@@ -11,6 +11,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedBlobServiceServer
cfg config.Cfg
locator storage.Locator
gitCmdFactory git.CommandFactory
diff --git a/internal/gitaly/service/cleanup/server.go b/internal/gitaly/service/cleanup/server.go
index bdbea9ac6..9499200c8 100644
--- a/internal/gitaly/service/cleanup/server.go
+++ b/internal/gitaly/service/cleanup/server.go
@@ -10,6 +10,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedCleanupServiceServer
cfg config.Cfg
gitCmdFactory git.CommandFactory
catfileCache catfile.Cache
diff --git a/internal/gitaly/service/commit/server.go b/internal/gitaly/service/commit/server.go
index 8cb2311d2..8e64fd8f7 100644
--- a/internal/gitaly/service/commit/server.go
+++ b/internal/gitaly/service/commit/server.go
@@ -13,6 +13,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedCommitServiceServer
cfg config.Cfg
locator storage.Locator
gitCmdFactory git.CommandFactory
diff --git a/internal/gitaly/service/conflicts/server.go b/internal/gitaly/service/conflicts/server.go
index d6f7b183d..3e880d8e0 100644
--- a/internal/gitaly/service/conflicts/server.go
+++ b/internal/gitaly/service/conflicts/server.go
@@ -12,6 +12,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedConflictsServiceServer
cfg config.Cfg
locator storage.Locator
gitCmdFactory git.CommandFactory
diff --git a/internal/gitaly/service/diff/server.go b/internal/gitaly/service/diff/server.go
index 489faceac..977b93b01 100644
--- a/internal/gitaly/service/diff/server.go
+++ b/internal/gitaly/service/diff/server.go
@@ -13,6 +13,7 @@ import (
const msgSizeThreshold = 5 * 1024
type server struct {
+ gitalypb.UnimplementedDiffServiceServer
MsgSizeThreshold int
cfg config.Cfg
locator storage.Locator
diff --git a/internal/gitaly/service/hook/server.go b/internal/gitaly/service/hook/server.go
index 0de10e6bc..6f65b38a6 100644
--- a/internal/gitaly/service/hook/server.go
+++ b/internal/gitaly/service/hook/server.go
@@ -24,6 +24,7 @@ var (
)
type server struct {
+ gitalypb.UnimplementedHookServiceServer
cfg config.Cfg
manager gitalyhook.Manager
gitCmdFactory git.CommandFactory
diff --git a/internal/gitaly/service/internalgitaly/server.go b/internal/gitaly/service/internalgitaly/server.go
index 8d4ddcbc4..4fd4f3aaa 100644
--- a/internal/gitaly/service/internalgitaly/server.go
+++ b/internal/gitaly/service/internalgitaly/server.go
@@ -6,6 +6,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedInternalGitalyServer
storages []config.Storage
}
diff --git a/internal/gitaly/service/namespace/server.go b/internal/gitaly/service/namespace/server.go
index 4077b6391..710cb655e 100644
--- a/internal/gitaly/service/namespace/server.go
+++ b/internal/gitaly/service/namespace/server.go
@@ -6,6 +6,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedNamespaceServiceServer
locator storage.Locator
}
diff --git a/internal/gitaly/service/objectpool/server.go b/internal/gitaly/service/objectpool/server.go
index 0406801b2..96869682e 100644
--- a/internal/gitaly/service/objectpool/server.go
+++ b/internal/gitaly/service/objectpool/server.go
@@ -9,6 +9,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedObjectPoolServiceServer
cfg config.Cfg
locator storage.Locator
gitCmdFactory git.CommandFactory
diff --git a/internal/gitaly/service/operations/server.go b/internal/gitaly/service/operations/server.go
index 1f870f9d9..1a5c8abe1 100644
--- a/internal/gitaly/service/operations/server.go
+++ b/internal/gitaly/service/operations/server.go
@@ -13,9 +13,11 @@ import (
"gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/hook"
"gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/rubyserver"
"gitlab.com/gitlab-org/gitaly/v14/internal/storage"
+ "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
)
type Server struct {
+ gitalypb.UnimplementedOperationServiceServer
cfg config.Cfg
ruby *rubyserver.Server
hookManager hook.Manager
diff --git a/internal/gitaly/service/ref/server.go b/internal/gitaly/service/ref/server.go
index 2852a9c6a..6dbb050ba 100644
--- a/internal/gitaly/service/ref/server.go
+++ b/internal/gitaly/service/ref/server.go
@@ -12,6 +12,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedRefServiceServer
cfg config.Cfg
txManager transaction.Manager
locator storage.Locator
diff --git a/internal/gitaly/service/remote/server.go b/internal/gitaly/service/remote/server.go
index 35785d415..2d0bd3daf 100644
--- a/internal/gitaly/service/remote/server.go
+++ b/internal/gitaly/service/remote/server.go
@@ -14,6 +14,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedRemoteServiceServer
cfg config.Cfg
ruby *rubyserver.Server
locator storage.Locator
diff --git a/internal/gitaly/service/repository/server.go b/internal/gitaly/service/repository/server.go
index 85a429041..eb6b71750 100644
--- a/internal/gitaly/service/repository/server.go
+++ b/internal/gitaly/service/repository/server.go
@@ -14,6 +14,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedRepositoryServiceServer
ruby *rubyserver.Server
conns *client.Pool
locator storage.Locator
diff --git a/internal/gitaly/service/server/server.go b/internal/gitaly/service/server/server.go
index 0fd568863..2d4f8acff 100644
--- a/internal/gitaly/service/server/server.go
+++ b/internal/gitaly/service/server/server.go
@@ -7,6 +7,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedServerServiceServer
gitCmdFactory git.CommandFactory
storages []config.Storage
}
diff --git a/internal/gitaly/service/smarthttp/server.go b/internal/gitaly/service/smarthttp/server.go
index 1a9bbea35..c61229f62 100644
--- a/internal/gitaly/service/smarthttp/server.go
+++ b/internal/gitaly/service/smarthttp/server.go
@@ -10,6 +10,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedSmartHTTPServiceServer
cfg config.Cfg
locator storage.Locator
gitCmdFactory git.CommandFactory
diff --git a/internal/gitaly/service/ssh/server.go b/internal/gitaly/service/ssh/server.go
index 5fc5d4852..b2a7d5735 100644
--- a/internal/gitaly/service/ssh/server.go
+++ b/internal/gitaly/service/ssh/server.go
@@ -17,6 +17,7 @@ var (
)
type server struct {
+ gitalypb.UnimplementedSSHServiceServer
cfg config.Cfg
locator storage.Locator
gitCmdFactory git.CommandFactory
diff --git a/internal/gitaly/service/wiki/server.go b/internal/gitaly/service/wiki/server.go
index f99ca64b6..c80e10590 100644
--- a/internal/gitaly/service/wiki/server.go
+++ b/internal/gitaly/service/wiki/server.go
@@ -7,6 +7,7 @@ import (
)
type server struct {
+ gitalypb.UnimplementedWikiServiceServer
ruby *rubyserver.Server
locator storage.Locator
}
diff --git a/internal/gitaly/transaction/manager_test.go b/internal/gitaly/transaction/manager_test.go
index 773f0b55f..633100998 100644
--- a/internal/gitaly/transaction/manager_test.go
+++ b/internal/gitaly/transaction/manager_test.go
@@ -23,6 +23,7 @@ import (
)
type testTransactionServer struct {
+ gitalypb.UnimplementedRefTransactionServer
vote func(*gitalypb.VoteTransactionRequest) (*gitalypb.VoteTransactionResponse, error)
stop func(*gitalypb.StopTransactionRequest) (*gitalypb.StopTransactionResponse, error)
}
diff --git a/internal/helper/chunk/chunker_test.go b/internal/helper/chunk/chunker_test.go
index 5cbaa49fb..9a6c865a8 100644
--- a/internal/helper/chunk/chunker_test.go
+++ b/internal/helper/chunk/chunker_test.go
@@ -64,7 +64,9 @@ func TestChunker(t *testing.T) {
}
}
-type server struct{}
+type server struct {
+ test.UnimplementedTestServer
+}
func (s *server) StreamOutput(req *test.StreamOutputRequest, srv test.Test_StreamOutputServer) error {
const kilobyte = 1024
diff --git a/internal/middleware/cache/cache_test.go b/internal/middleware/cache/cache_test.go
index 7c3d3fa1d..c0bd25aed 100644
--- a/internal/middleware/cache/cache_test.go
+++ b/internal/middleware/cache/cache_test.go
@@ -200,6 +200,7 @@ func newTestSvc(t testing.TB, ctx context.Context, srvr *grpc.Server, svc testda
}
type testSvc struct {
+ testdata.UnimplementedTestServiceServer
repoRequests []gitalypb.Repository
}
diff --git a/internal/middleware/limithandler/testhelper_test.go b/internal/middleware/limithandler/testhelper_test.go
index b299cbb81..7ae5c7046 100644
--- a/internal/middleware/limithandler/testhelper_test.go
+++ b/internal/middleware/limithandler/testhelper_test.go
@@ -8,8 +8,9 @@ import (
)
type server struct {
+ pb.UnimplementedTestServer
requestCount uint64
- blockCh chan (struct{})
+ blockCh chan struct{}
}
func (s *server) registerRequest() {
diff --git a/internal/praefect/grpc-proxy/proxy/helper_test.go b/internal/praefect/grpc-proxy/proxy/helper_test.go
index d225732df..c899198e1 100644
--- a/internal/praefect/grpc-proxy/proxy/helper_test.go
+++ b/internal/praefect/grpc-proxy/proxy/helper_test.go
@@ -88,6 +88,7 @@ func newProxy(tb testing.TB, ctx context.Context, director proxy.StreamDirector,
// interceptPinger allows an RPC to be intercepted with a custom
// function defined in each unit test
type interceptPinger struct {
+ testservice.UnimplementedTestServiceServer
pingStream func(testservice.TestService_PingStreamServer) error
pingEmpty func(context.Context, *testservice.Empty) (*testservice.PingResponse, error)
ping func(context.Context, *testservice.PingRequest) (*testservice.PingResponse, error)
diff --git a/internal/praefect/middleware/errorhandler_test.go b/internal/praefect/middleware/errorhandler_test.go
index c2634883d..3b5d12312 100644
--- a/internal/praefect/middleware/errorhandler_test.go
+++ b/internal/praefect/middleware/errorhandler_test.go
@@ -20,7 +20,9 @@ import (
"google.golang.org/grpc"
)
-type simpleService struct{}
+type simpleService struct {
+ mock.UnimplementedSimpleServiceServer
+}
func (s *simpleService) RepoAccessorUnary(ctx context.Context, in *mock.RepoRequest) (*empty.Empty, error) {
if in.GetRepo() == nil {
diff --git a/internal/praefect/mocksvc_test.go b/internal/praefect/mocksvc_test.go
index 891e17180..993fdd027 100644
--- a/internal/praefect/mocksvc_test.go
+++ b/internal/praefect/mocksvc_test.go
@@ -15,6 +15,7 @@ type (
// mockSvc is an implementation of mock.SimpleServer for testing purposes. The
// gRPC stub can be updated by running `make proto`.
type mockSvc struct {
+ mock.UnimplementedSimpleServiceServer
repoAccessorUnary repoAccessorUnaryFunc
repoMutatorUnary repoMutatorUnaryFunc
}
diff --git a/internal/praefect/server_test.go b/internal/praefect/server_test.go
index b69b25865..23f71b6ed 100644
--- a/internal/praefect/server_test.go
+++ b/internal/praefect/server_test.go
@@ -610,6 +610,7 @@ func TestRenameRepository(t *testing.T) {
}
type mockSmartHTTP struct {
+ gitalypb.UnimplementedSmartHTTPServiceServer
txMgr *transactions.Manager
m sync.Mutex
methodsCalled map[string]int
diff --git a/internal/praefect/service/info/server.go b/internal/praefect/service/info/server.go
index 73792e8d1..0a81c8cf3 100644
--- a/internal/praefect/service/info/server.go
+++ b/internal/praefect/service/info/server.go
@@ -34,6 +34,7 @@ type PrimaryGetter interface {
// Server is a InfoService server
type Server struct {
+ gitalypb.UnimplementedPraefectInfoServiceServer
nodeMgr nodes.Manager
conf config.Config
queue datastore.ReplicationEventQueue
diff --git a/internal/praefect/service/server/server.go b/internal/praefect/service/server/server.go
index 3c6643cd6..b6b14f63b 100644
--- a/internal/praefect/service/server/server.go
+++ b/internal/praefect/service/server/server.go
@@ -8,6 +8,7 @@ import (
// Server is a ServerService server
type Server struct {
+ gitalypb.UnimplementedServerServiceServer
conf config.Config
conns service.Connections
}
diff --git a/internal/praefect/service/transaction/server.go b/internal/praefect/service/transaction/server.go
index 1311f6d6c..086449532 100644
--- a/internal/praefect/service/transaction/server.go
+++ b/internal/praefect/service/transaction/server.go
@@ -12,6 +12,7 @@ import (
)
type Server struct {
+ gitalypb.UnimplementedRefTransactionServer
txMgr *transactions.Manager
}