diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2021-01-18 18:46:15 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2021-01-19 14:27:52 +0300 |
commit | e0d6dcbc3780a31e558bb31f39e88eefd4263236 (patch) | |
tree | 5a0b0c940e33b2ef98ff1fc2b9c8d32465789c3b /internal/praefect/mock | |
parent | 4134a951357db2f5347af93f4fa16dc7076eda6b (diff) |
unify test proto generation
Pulls the generation code from a lonely Makefile in to our protobuf
generation Makefile target. This helps keep the generation workflow
the same with every proto file and ensure the generation code works.
Diffstat (limited to 'internal/praefect/mock')
-rw-r--r-- | internal/praefect/mock/mock.pb.go | 58 | ||||
-rw-r--r-- | internal/praefect/mock/mock.proto | 5 |
2 files changed, 32 insertions, 31 deletions
diff --git a/internal/praefect/mock/mock.pb.go b/internal/praefect/mock/mock.pb.go index 6f66b292b..31a2ecc47 100644 --- a/internal/praefect/mock/mock.pb.go +++ b/internal/praefect/mock/mock.pb.go @@ -1,19 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: mock.proto +// source: praefect/mock/mock.proto package mock import ( context "context" fmt "fmt" - math "math" - proto "github.com/golang/protobuf/proto" empty "github.com/golang/protobuf/ptypes/empty" gitalypb "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -38,7 +37,7 @@ func (m *SimpleRequest) Reset() { *m = SimpleRequest{} } func (m *SimpleRequest) String() string { return proto.CompactTextString(m) } func (*SimpleRequest) ProtoMessage() {} func (*SimpleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6fa4806c90f7156d, []int{0} + return fileDescriptor_d20d83172fd49eb0, []int{0} } func (m *SimpleRequest) XXX_Unmarshal(b []byte) error { @@ -77,7 +76,7 @@ func (m *SimpleResponse) Reset() { *m = SimpleResponse{} } func (m *SimpleResponse) String() string { return proto.CompactTextString(m) } func (*SimpleResponse) ProtoMessage() {} func (*SimpleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6fa4806c90f7156d, []int{1} + return fileDescriptor_d20d83172fd49eb0, []int{1} } func (m *SimpleResponse) XXX_Unmarshal(b []byte) error { @@ -116,7 +115,7 @@ func (m *RepoRequest) Reset() { *m = RepoRequest{} } func (m *RepoRequest) String() string { return proto.CompactTextString(m) } func (*RepoRequest) ProtoMessage() {} func (*RepoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6fa4806c90f7156d, []int{2} + return fileDescriptor_d20d83172fd49eb0, []int{2} } func (m *RepoRequest) XXX_Unmarshal(b []byte) error { @@ -150,28 +149,29 @@ func init() { proto.RegisterType((*RepoRequest)(nil), "mock.RepoRequest") } -func init() { proto.RegisterFile("mock.proto", fileDescriptor_6fa4806c90f7156d) } - -var fileDescriptor_6fa4806c90f7156d = []byte{ - // 279 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x90, 0x41, 0x4a, 0xc3, 0x40, - 0x14, 0x86, 0x99, 0x90, 0x96, 0xf0, 0xaa, 0xa5, 0x1d, 0x8b, 0x48, 0xdc, 0x48, 0x40, 0xc9, 0xa2, - 0x4c, 0xa1, 0x2e, 0x5d, 0x29, 0xc4, 0x9d, 0x9b, 0x14, 0x0f, 0x90, 0xc6, 0x67, 0x0c, 0x26, 0x7d, - 0xe3, 0xcc, 0xa4, 0x90, 0x93, 0xd4, 0x13, 0x79, 0x13, 0x2f, 0xd1, 0x95, 0x4c, 0x86, 0x60, 0xbb, - 0xed, 0xee, 0xbd, 0x7f, 0xbe, 0xf9, 0xe7, 0x9f, 0x1f, 0xa0, 0xa6, 0xfc, 0x53, 0x48, 0x45, 0x86, - 0xb8, 0x6f, 0xe7, 0xf0, 0x4c, 0x7f, 0x64, 0x0a, 0xdf, 0x9c, 0x16, 0x5e, 0x17, 0x44,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x01, 0x00, 0x00, +func init() { proto.RegisterFile("praefect/mock/mock.proto", fileDescriptor_d20d83172fd49eb0) } + +var fileDescriptor_d20d83172fd49eb0 = []byte{ + // 293 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x90, 0xc1, 0x4a, 0xc3, 0x30, + 0x1c, 0xc6, 0x49, 0xe9, 0xc6, 0xc8, 0x74, 0x6c, 0x71, 0xc8, 0xa8, 0x17, 0x29, 0x28, 0x3d, 0x8c, + 0x14, 0xe6, 0xd1, 0x93, 0x42, 0xbd, 0x79, 0xe9, 0xf0, 0x01, 0xb2, 0xfa, 0x5f, 0x2d, 0xb6, 0x4d, + 0x4c, 0xd2, 0x41, 0x9f, 0x64, 0x3e, 0x91, 0x6f, 0xe2, 0x4b, 0xec, 0x24, 0x49, 0x0c, 0x6e, 0x57, + 0x2f, 0xe5, 0xff, 0xff, 0xfa, 0xcb, 0x97, 0x2f, 0x1f, 0x5e, 0x08, 0xc9, 0x60, 0x0b, 0x85, 0x4e, + 0x1b, 0x5e, 0xbc, 0xdb, 0x0f, 0x15, 0x92, 0x6b, 0x4e, 0x42, 0x33, 0x47, 0x67, 0xea, 0x8d, 0x49, + 0x78, 0x75, 0x5a, 0x84, 0xeb, 0xaa, 0xd5, 0xbf, 0xf3, 0x55, 0xc9, 0x79, 0x59, 0x43, 0x6a, 0xb7, + 0x4d, 0xb7, 0x4d, 0xa1, 0x11, 0xba, 0x77, 0x3f, 0xe3, 0x1b, 0x7c, 0xbe, 0xae, 0x1a, 0x51, 0x43, + 0x0e, 0x1f, 0x1d, 0x28, 0x4d, 0xe6, 0x78, 0xb0, 0x63, 0x75, 0x07, 0x0b, 0x74, 0x8d, 0x92, 0x41, + 0xee, 0x96, 0xf8, 0x16, 0x4f, 0x3c, 0xa6, 0x04, 0x6f, 0x15, 0xfc, 0x71, 0xc1, 0x31, 0x77, 0x8f, + 0xc7, 0x39, 0x08, 0xee, 0xcd, 0x96, 0x38, 0x94, 0x20, 0xb8, 0xf5, 0x1a, 0xaf, 0x08, 0x2d, 0x2b, + 0xcd, 0xea, 0x9e, 0x1a, 0x44, 0x55, 0x9a, 0xcb, 0xfe, 0x31, 0xfc, 0xfc, 0x5a, 0xa2, 0xdc, 0x52, + 0xab, 0x6f, 0xe4, 0xc3, 0xac, 0x41, 0xee, 0xaa, 0x02, 0x48, 0x86, 0x27, 0x66, 0x04, 0xf9, 0x50, + 0x14, 0xa0, 0x14, 0x97, 0xe4, 0x82, 0xda, 0x97, 0x9f, 0x64, 0x8e, 0xe6, 0xa7, 0xa2, 0x4b, 0x18, + 0x8f, 0x0e, 0xfb, 0x24, 0x1c, 0x05, 0x53, 0x44, 0x9e, 0xf0, 0xcc, 0x5c, 0xe9, 0x4d, 0x5e, 0x5a, + 0x26, 0x7b, 0x32, 0x73, 0x87, 0x8e, 0xe2, 0x46, 0x97, 0xd4, 0x55, 0x45, 0x7d, 0x55, 0x34, 0x33, + 0x55, 0xc5, 0xc3, 0xc3, 0x3e, 0x09, 0x46, 0x01, 0xc9, 0xf0, 0xd4, 0xe0, 0xcf, 0x9d, 0x66, 0xfa, + 0xdf, 0x36, 0x68, 0x33, 0xb4, 0xfa, 0xdd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xd2, 0xcb, + 0x4b, 0xd3, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -329,5 +329,5 @@ var _SimpleService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "mock.proto", + Metadata: "praefect/mock/mock.proto", } diff --git a/internal/praefect/mock/mock.proto b/internal/praefect/mock/mock.proto index 8aa159efa..e26ca10c8 100644 --- a/internal/praefect/mock/mock.proto +++ b/internal/praefect/mock/mock.proto @@ -8,6 +8,7 @@ syntax = "proto3"; package mock; import "shared.proto"; +import "lint.proto"; import "google/protobuf/empty.proto"; message SimpleRequest { @@ -30,7 +31,7 @@ service SimpleService { scope_level: SERVER }; } - + // RepoAccessorUnary is a unary RPC that accesses a repo rpc RepoAccessorUnary(RepoRequest) returns (google.protobuf.Empty) { option (gitaly.op_type) = { @@ -38,7 +39,7 @@ service SimpleService { scope_level: REPOSITORY }; } - + // RepoMutatorUnary is a unary RPC that mutates a repo rpc RepoMutatorUnary(RepoRequest) returns (google.protobuf.Empty) { option (gitaly.op_type) = { |