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

transaction.pb.go « gitalypb « go « proto - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6f70b1cfab0c6b891942c82bc2b5f28f42695248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: transaction.proto

package gitalypb

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	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.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

// The outcome of the given transaction telling the client whether the
// transaction should be committed or rolled back.
type VoteTransactionResponse_TransactionState int32

const (
	VoteTransactionResponse_COMMIT VoteTransactionResponse_TransactionState = 0
	VoteTransactionResponse_ABORT  VoteTransactionResponse_TransactionState = 1
	VoteTransactionResponse_STOP   VoteTransactionResponse_TransactionState = 2
)

var VoteTransactionResponse_TransactionState_name = map[int32]string{
	0: "COMMIT",
	1: "ABORT",
	2: "STOP",
}

var VoteTransactionResponse_TransactionState_value = map[string]int32{
	"COMMIT": 0,
	"ABORT":  1,
	"STOP":   2,
}

func (x VoteTransactionResponse_TransactionState) String() string {
	return proto.EnumName(VoteTransactionResponse_TransactionState_name, int32(x))
}

func (VoteTransactionResponse_TransactionState) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_2cc4e03d2c28c490, []int{1, 0}
}

type VoteTransactionRequest struct {
	Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// ID of the transaction we're processing
	TransactionId uint64 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	// Name of the Gitaly node that's voting on a transaction.
	Node string `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"`
	// SHA1 of the references that are to be updated
	ReferenceUpdatesHash []byte   `protobuf:"bytes,4,opt,name=reference_updates_hash,json=referenceUpdatesHash,proto3" json:"reference_updates_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *VoteTransactionRequest) Reset()         { *m = VoteTransactionRequest{} }
func (m *VoteTransactionRequest) String() string { return proto.CompactTextString(m) }
func (*VoteTransactionRequest) ProtoMessage()    {}
func (*VoteTransactionRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_2cc4e03d2c28c490, []int{0}
}

func (m *VoteTransactionRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_VoteTransactionRequest.Unmarshal(m, b)
}
func (m *VoteTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_VoteTransactionRequest.Marshal(b, m, deterministic)
}
func (m *VoteTransactionRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_VoteTransactionRequest.Merge(m, src)
}
func (m *VoteTransactionRequest) XXX_Size() int {
	return xxx_messageInfo_VoteTransactionRequest.Size(m)
}
func (m *VoteTransactionRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_VoteTransactionRequest.DiscardUnknown(m)
}

var xxx_messageInfo_VoteTransactionRequest proto.InternalMessageInfo

func (m *VoteTransactionRequest) GetRepository() *Repository {
	if m != nil {
		return m.Repository
	}
	return nil
}

func (m *VoteTransactionRequest) GetTransactionId() uint64 {
	if m != nil {
		return m.TransactionId
	}
	return 0
}

func (m *VoteTransactionRequest) GetNode() string {
	if m != nil {
		return m.Node
	}
	return ""
}

func (m *VoteTransactionRequest) GetReferenceUpdatesHash() []byte {
	if m != nil {
		return m.ReferenceUpdatesHash
	}
	return nil
}

type VoteTransactionResponse struct {
	State                VoteTransactionResponse_TransactionState `protobuf:"varint,1,opt,name=state,proto3,enum=gitaly.VoteTransactionResponse_TransactionState" json:"state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                 `json:"-"`
	XXX_unrecognized     []byte                                   `json:"-"`
	XXX_sizecache        int32                                    `json:"-"`
}

func (m *VoteTransactionResponse) Reset()         { *m = VoteTransactionResponse{} }
func (m *VoteTransactionResponse) String() string { return proto.CompactTextString(m) }
func (*VoteTransactionResponse) ProtoMessage()    {}
func (*VoteTransactionResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_2cc4e03d2c28c490, []int{1}
}

func (m *VoteTransactionResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_VoteTransactionResponse.Unmarshal(m, b)
}
func (m *VoteTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_VoteTransactionResponse.Marshal(b, m, deterministic)
}
func (m *VoteTransactionResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_VoteTransactionResponse.Merge(m, src)
}
func (m *VoteTransactionResponse) XXX_Size() int {
	return xxx_messageInfo_VoteTransactionResponse.Size(m)
}
func (m *VoteTransactionResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_VoteTransactionResponse.DiscardUnknown(m)
}

var xxx_messageInfo_VoteTransactionResponse proto.InternalMessageInfo

func (m *VoteTransactionResponse) GetState() VoteTransactionResponse_TransactionState {
	if m != nil {
		return m.State
	}
	return VoteTransactionResponse_COMMIT
}

type StopTransactionRequest struct {
	Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// ID of the transaction we're processing
	TransactionId        uint64   `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *StopTransactionRequest) Reset()         { *m = StopTransactionRequest{} }
func (m *StopTransactionRequest) String() string { return proto.CompactTextString(m) }
func (*StopTransactionRequest) ProtoMessage()    {}
func (*StopTransactionRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_2cc4e03d2c28c490, []int{2}
}

func (m *StopTransactionRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StopTransactionRequest.Unmarshal(m, b)
}
func (m *StopTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StopTransactionRequest.Marshal(b, m, deterministic)
}
func (m *StopTransactionRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StopTransactionRequest.Merge(m, src)
}
func (m *StopTransactionRequest) XXX_Size() int {
	return xxx_messageInfo_StopTransactionRequest.Size(m)
}
func (m *StopTransactionRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_StopTransactionRequest.DiscardUnknown(m)
}

var xxx_messageInfo_StopTransactionRequest proto.InternalMessageInfo

func (m *StopTransactionRequest) GetRepository() *Repository {
	if m != nil {
		return m.Repository
	}
	return nil
}

func (m *StopTransactionRequest) GetTransactionId() uint64 {
	if m != nil {
		return m.TransactionId
	}
	return 0
}

type StopTransactionResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *StopTransactionResponse) Reset()         { *m = StopTransactionResponse{} }
func (m *StopTransactionResponse) String() string { return proto.CompactTextString(m) }
func (*StopTransactionResponse) ProtoMessage()    {}
func (*StopTransactionResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_2cc4e03d2c28c490, []int{3}
}

func (m *StopTransactionResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StopTransactionResponse.Unmarshal(m, b)
}
func (m *StopTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StopTransactionResponse.Marshal(b, m, deterministic)
}
func (m *StopTransactionResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StopTransactionResponse.Merge(m, src)
}
func (m *StopTransactionResponse) XXX_Size() int {
	return xxx_messageInfo_StopTransactionResponse.Size(m)
}
func (m *StopTransactionResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_StopTransactionResponse.DiscardUnknown(m)
}

var xxx_messageInfo_StopTransactionResponse proto.InternalMessageInfo

func init() {
	proto.RegisterEnum("gitaly.VoteTransactionResponse_TransactionState", VoteTransactionResponse_TransactionState_name, VoteTransactionResponse_TransactionState_value)
	proto.RegisterType((*VoteTransactionRequest)(nil), "gitaly.VoteTransactionRequest")
	proto.RegisterType((*VoteTransactionResponse)(nil), "gitaly.VoteTransactionResponse")
	proto.RegisterType((*StopTransactionRequest)(nil), "gitaly.StopTransactionRequest")
	proto.RegisterType((*StopTransactionResponse)(nil), "gitaly.StopTransactionResponse")
}

func init() { proto.RegisterFile("transaction.proto", fileDescriptor_2cc4e03d2c28c490) }

var fileDescriptor_2cc4e03d2c28c490 = []byte{
	// 385 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x52, 0xc1, 0x6e, 0xda, 0x40,
	0x14, 0xec, 0x52, 0x63, 0xc1, 0x2b, 0xa5, 0xee, 0xaa, 0x02, 0x97, 0x43, 0x6b, 0x59, 0xaa, 0xe4,
	0x43, 0x6b, 0x23, 0xe8, 0xa1, 0xd7, 0x52, 0xa9, 0x2a, 0x07, 0x44, 0xb5, 0x38, 0x39, 0x70, 0x41,
	0x0b, 0x5e, 0xb0, 0x25, 0xe2, 0x75, 0x76, 0x97, 0x03, 0x3f, 0x92, 0xe4, 0x7f, 0x22, 0x45, 0xf9,
	0xa6, 0x9c, 0x22, 0xbc, 0x01, 0x2c, 0x08, 0xca, 0x31, 0xb7, 0x7d, 0x33, 0x6f, 0xc6, 0x6f, 0x46,
	0x86, 0x8f, 0x4a, 0xd0, 0x54, 0xd2, 0x99, 0x4a, 0x78, 0xea, 0x67, 0x82, 0x2b, 0x8e, 0xcd, 0x45,
	0xa2, 0xe8, 0x72, 0xdd, 0x82, 0x65, 0x92, 0x2a, 0x8d, 0xb5, 0x6a, 0x32, 0xa6, 0x82, 0x45, 0x7a,
	0x72, 0x6f, 0x11, 0x34, 0xce, 0xb9, 0x62, 0xe1, 0x5e, 0x4b, 0xd8, 0xe5, 0x8a, 0x49, 0x85, 0x7f,
	0x01, 0x08, 0x96, 0x71, 0x99, 0x28, 0x2e, 0xd6, 0x36,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,
	0xf3, 0xe1, 0xda, 0x2b, 0x55, 0xd0, 0xc6, 0xfb, 0xe0, 0x92, 0xbd, 0xf7, 0xf3, 0xed, 0xec, 0xbd,
	0x4f, 0x44, 0xd8, 0x7a, 0xf7, 0xda, 0xe3, 0xcd, 0xe6, 0x92, 0x4e, 0xfd, 0x19, 0xbf, 0x08, 0xf4,
	0xf3, 0x07, 0x17, 0x8b, 0x40, 0xeb, 0x83, 0xfc, 0x2f, 0x0f, 0x16, 0xfc, 0x69, 0xce, 0xa6, 0x53,
	0x33, 0x87, 0xba, 0x8f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x19, 0xe6, 0x7d, 0x2f, 0x03, 0x00,
	0x00,
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// RefTransactionClient is the client API for RefTransaction service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RefTransactionClient interface {
	VoteTransaction(ctx context.Context, in *VoteTransactionRequest, opts ...grpc.CallOption) (*VoteTransactionResponse, error)
	StopTransaction(ctx context.Context, in *StopTransactionRequest, opts ...grpc.CallOption) (*StopTransactionResponse, error)
}

type refTransactionClient struct {
	cc *grpc.ClientConn
}

func NewRefTransactionClient(cc *grpc.ClientConn) RefTransactionClient {
	return &refTransactionClient{cc}
}

func (c *refTransactionClient) VoteTransaction(ctx context.Context, in *VoteTransactionRequest, opts ...grpc.CallOption) (*VoteTransactionResponse, error) {
	out := new(VoteTransactionResponse)
	err := c.cc.Invoke(ctx, "/gitaly.RefTransaction/VoteTransaction", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *refTransactionClient) StopTransaction(ctx context.Context, in *StopTransactionRequest, opts ...grpc.CallOption) (*StopTransactionResponse, error) {
	out := new(StopTransactionResponse)
	err := c.cc.Invoke(ctx, "/gitaly.RefTransaction/StopTransaction", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RefTransactionServer is the server API for RefTransaction service.
type RefTransactionServer interface {
	VoteTransaction(context.Context, *VoteTransactionRequest) (*VoteTransactionResponse, error)
	StopTransaction(context.Context, *StopTransactionRequest) (*StopTransactionResponse, error)
}

// UnimplementedRefTransactionServer can be embedded to have forward compatible implementations.
type UnimplementedRefTransactionServer struct {
}

func (*UnimplementedRefTransactionServer) VoteTransaction(ctx context.Context, req *VoteTransactionRequest) (*VoteTransactionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method VoteTransaction not implemented")
}
func (*UnimplementedRefTransactionServer) StopTransaction(ctx context.Context, req *StopTransactionRequest) (*StopTransactionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StopTransaction not implemented")
}

func RegisterRefTransactionServer(s *grpc.Server, srv RefTransactionServer) {
	s.RegisterService(&_RefTransaction_serviceDesc, srv)
}

func _RefTransaction_VoteTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VoteTransactionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RefTransactionServer).VoteTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.RefTransaction/VoteTransaction",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RefTransactionServer).VoteTransaction(ctx, req.(*VoteTransactionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RefTransaction_StopTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StopTransactionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RefTransactionServer).StopTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.RefTransaction/StopTransaction",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RefTransactionServer).StopTransaction(ctx, req.(*StopTransactionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _RefTransaction_serviceDesc = grpc.ServiceDesc{
	ServiceName: "gitaly.RefTransaction",
	HandlerType: (*RefTransactionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "VoteTransaction",
			Handler:    _RefTransaction_VoteTransaction_Handler,
		},
		{
			MethodName: "StopTransaction",
			Handler:    _RefTransaction_StopTransaction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "transaction.proto",
}