File: spanner.pb.go

package info (click to toggle)
golang-google-cloud 0.56.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, bullseye-backports
  • size: 22,368 kB
  • sloc: sh: 191; ansic: 75; makefile: 65; awk: 64; asm: 46; python: 21
file content (436 lines) | stat: -rw-r--r-- 15,878 bytes parent folder | download | duplicates (3)
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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: spanner.proto

package spanner_bench

import (
	context "context"
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// 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

type ReadQuery struct {
	// The query to use in the read call.
	Query                string   `protobuf:"bytes,1,opt,name=Query,proto3" json:"Query,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_ReadQuery proto.InternalMessageInfo

func (m *ReadQuery) GetQuery() string {
	if m != nil {
		return m.Query
	}
	return ""
}

type User struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Age                  int64    `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_User proto.InternalMessageInfo

func (m *User) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *User) GetAge() int64 {
	if m != nil {
		return m.Age
	}
	return 0
}

type InsertQuery struct {
	// The query to use in the insert call.
	Users                []*User  `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_InsertQuery proto.InternalMessageInfo

func (m *InsertQuery) GetUsers() []*User {
	if m != nil {
		return m.Users
	}
	return nil
}

type UpdateQuery struct {
	// The queries to use in the update call.
	Queries              []string `protobuf:"bytes,1,rep,name=Queries,proto3" json:"Queries,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_UpdateQuery proto.InternalMessageInfo

func (m *UpdateQuery) GetQueries() []string {
	if m != nil {
		return m.Queries
	}
	return nil
}

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

func (m *EmptyResponse) Reset()         { *m = EmptyResponse{} }
func (m *EmptyResponse) String() string { return proto.CompactTextString(m) }
func (*EmptyResponse) ProtoMessage()    {}
func (*EmptyResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_879d3e919e93c6ba, []int{4}
}

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

var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo

func init() {
	proto.RegisterType((*ReadQuery)(nil), "spanner_bench.ReadQuery")
	proto.RegisterType((*User)(nil), "spanner_bench.User")
	proto.RegisterType((*InsertQuery)(nil), "spanner_bench.InsertQuery")
	proto.RegisterType((*UpdateQuery)(nil), "spanner_bench.UpdateQuery")
	proto.RegisterType((*EmptyResponse)(nil), "spanner_bench.EmptyResponse")
}

func init() { proto.RegisterFile("spanner.proto", fileDescriptor_879d3e919e93c6ba) }

var fileDescriptor_879d3e919e93c6ba = []byte{
	// 254 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xb1, 0x4e, 0xc3, 0x30,
	0x10, 0x86, 0x31, 0x49, 0x8b, 0x72, 0x51, 0x05, 0xba, 0x32, 0x58, 0x15, 0x43, 0xf0, 0x42, 0x90,
	0x50, 0x86, 0xb2, 0x30, 0x22, 0x04, 0x03, 0x23, 0x46, 0x15, 0x23, 0x72, 0xe9, 0x09, 0x18, 0xea,
	0x58, 0xb6,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x09, 0xff, 0x47, 0x99, 0x0f, 0xbb, 0x0f, 0xbc,
	0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x2e, 0xa6, 0x11, 0xd1, 0x01, 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

// SpannerBenchWrapperClient is the client API for SpannerBenchWrapper service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SpannerBenchWrapperClient interface {
	// Read represents operations like Go's ReadOnlyTransaction.Query, Java's
	// ReadOnlyTransaction.executeQuery, Python's snapshot.read, and Node's
	// Transaction.Read.
	//
	// It will typically be used to read many items.
	Read(ctx context.Context, in *ReadQuery, opts ...grpc.CallOption) (*EmptyResponse, error)
	// Insert represents operations like Go's Client.Apply, Java's
	// DatabaseClient.writeAtLeastOnce, Python's transaction.commit, and Node's
	// Transaction.Commit.
	//
	// It will typically be used to insert many items.
	Insert(ctx context.Context, in *InsertQuery, opts ...grpc.CallOption) (*EmptyResponse, error)
	// Update represents operations like Go's ReadWriteTransaction.BatchUpdate,
	// Java's TransactionRunner.run, Python's Batch.update, and Node's
	// Transaction.BatchUpdate.
	//
	// It will typically be used to update many items.
	Update(ctx context.Context, in *UpdateQuery, opts ...grpc.CallOption) (*EmptyResponse, error)
}

type spannerBenchWrapperClient struct {
	cc *grpc.ClientConn
}

func NewSpannerBenchWrapperClient(cc *grpc.ClientConn) SpannerBenchWrapperClient {
	return &spannerBenchWrapperClient{cc}
}

func (c *spannerBenchWrapperClient) Read(ctx context.Context, in *ReadQuery, opts ...grpc.CallOption) (*EmptyResponse, error) {
	out := new(EmptyResponse)
	err := c.cc.Invoke(ctx, "/spanner_bench.SpannerBenchWrapper/Read", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *spannerBenchWrapperClient) Insert(ctx context.Context, in *InsertQuery, opts ...grpc.CallOption) (*EmptyResponse, error) {
	out := new(EmptyResponse)
	err := c.cc.Invoke(ctx, "/spanner_bench.SpannerBenchWrapper/Insert", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *spannerBenchWrapperClient) Update(ctx context.Context, in *UpdateQuery, opts ...grpc.CallOption) (*EmptyResponse, error) {
	out := new(EmptyResponse)
	err := c.cc.Invoke(ctx, "/spanner_bench.SpannerBenchWrapper/Update", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SpannerBenchWrapperServer is the server API for SpannerBenchWrapper service.
type SpannerBenchWrapperServer interface {
	// Read represents operations like Go's ReadOnlyTransaction.Query, Java's
	// ReadOnlyTransaction.executeQuery, Python's snapshot.read, and Node's
	// Transaction.Read.
	//
	// It will typically be used to read many items.
	Read(context.Context, *ReadQuery) (*EmptyResponse, error)
	// Insert represents operations like Go's Client.Apply, Java's
	// DatabaseClient.writeAtLeastOnce, Python's transaction.commit, and Node's
	// Transaction.Commit.
	//
	// It will typically be used to insert many items.
	Insert(context.Context, *InsertQuery) (*EmptyResponse, error)
	// Update represents operations like Go's ReadWriteTransaction.BatchUpdate,
	// Java's TransactionRunner.run, Python's Batch.update, and Node's
	// Transaction.BatchUpdate.
	//
	// It will typically be used to update many items.
	Update(context.Context, *UpdateQuery) (*EmptyResponse, error)
}

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

func (*UnimplementedSpannerBenchWrapperServer) Read(ctx context.Context, req *ReadQuery) (*EmptyResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Read not implemented")
}
func (*UnimplementedSpannerBenchWrapperServer) Insert(ctx context.Context, req *InsertQuery) (*EmptyResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented")
}
func (*UnimplementedSpannerBenchWrapperServer) Update(ctx context.Context, req *UpdateQuery) (*EmptyResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}

func RegisterSpannerBenchWrapperServer(s *grpc.Server, srv SpannerBenchWrapperServer) {
	s.RegisterService(&_SpannerBenchWrapper_serviceDesc, srv)
}

func _SpannerBenchWrapper_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReadQuery)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpannerBenchWrapperServer).Read(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spanner_bench.SpannerBenchWrapper/Read",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpannerBenchWrapperServer).Read(ctx, req.(*ReadQuery))
	}
	return interceptor(ctx, in, info, handler)
}

func _SpannerBenchWrapper_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InsertQuery)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpannerBenchWrapperServer).Insert(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spanner_bench.SpannerBenchWrapper/Insert",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpannerBenchWrapperServer).Insert(ctx, req.(*InsertQuery))
	}
	return interceptor(ctx, in, info, handler)
}

func _SpannerBenchWrapper_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateQuery)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpannerBenchWrapperServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spanner_bench.SpannerBenchWrapper/Update",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpannerBenchWrapperServer).Update(ctx, req.(*UpdateQuery))
	}
	return interceptor(ctx, in, info, handler)
}

var _SpannerBenchWrapper_serviceDesc = grpc.ServiceDesc{
	ServiceName: "spanner_bench.SpannerBenchWrapper",
	HandlerType: (*SpannerBenchWrapperServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Read",
			Handler:    _SpannerBenchWrapper_Read_Handler,
		},
		{
			MethodName: "Insert",
			Handler:    _SpannerBenchWrapper_Insert_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _SpannerBenchWrapper_Update_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "spanner.proto",
}