@yarcinema/contracts 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,538 @@
1
+ // Code generated by protoc-gen-go. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-go v1.34.1
4
+ // protoc v7.34.1
5
+ // source: media.proto
6
+
7
+ package mediav1
8
+
9
+ import (
10
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12
+ reflect "reflect"
13
+ sync "sync"
14
+ )
15
+
16
+ const (
17
+ // Verify that this generated code is sufficiently up-to-date.
18
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
19
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
20
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
21
+ )
22
+
23
+ type UploadRequest struct {
24
+ state protoimpl.MessageState
25
+ sizeCache protoimpl.SizeCache
26
+ unknownFields protoimpl.UnknownFields
27
+
28
+ FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
29
+ Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
30
+ ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
31
+ Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
32
+ ResizeWidth *int32 `protobuf:"varint,5,opt,name=resize_width,json=resizeWidth,proto3,oneof" json:"resize_width,omitempty"`
33
+ ResizeHeight *int32 `protobuf:"varint,6,opt,name=resize_height,json=resizeHeight,proto3,oneof" json:"resize_height,omitempty"`
34
+ }
35
+
36
+ func (x *UploadRequest) Reset() {
37
+ *x = UploadRequest{}
38
+ if protoimpl.UnsafeEnabled {
39
+ mi := &file_media_proto_msgTypes[0]
40
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
41
+ ms.StoreMessageInfo(mi)
42
+ }
43
+ }
44
+
45
+ func (x *UploadRequest) String() string {
46
+ return protoimpl.X.MessageStringOf(x)
47
+ }
48
+
49
+ func (*UploadRequest) ProtoMessage() {}
50
+
51
+ func (x *UploadRequest) ProtoReflect() protoreflect.Message {
52
+ mi := &file_media_proto_msgTypes[0]
53
+ if protoimpl.UnsafeEnabled && x != nil {
54
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
55
+ if ms.LoadMessageInfo() == nil {
56
+ ms.StoreMessageInfo(mi)
57
+ }
58
+ return ms
59
+ }
60
+ return mi.MessageOf(x)
61
+ }
62
+
63
+ // Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.
64
+ func (*UploadRequest) Descriptor() ([]byte, []int) {
65
+ return file_media_proto_rawDescGZIP(), []int{0}
66
+ }
67
+
68
+ func (x *UploadRequest) GetFileName() string {
69
+ if x != nil {
70
+ return x.FileName
71
+ }
72
+ return ""
73
+ }
74
+
75
+ func (x *UploadRequest) GetFolder() string {
76
+ if x != nil {
77
+ return x.Folder
78
+ }
79
+ return ""
80
+ }
81
+
82
+ func (x *UploadRequest) GetContentType() string {
83
+ if x != nil {
84
+ return x.ContentType
85
+ }
86
+ return ""
87
+ }
88
+
89
+ func (x *UploadRequest) GetData() []byte {
90
+ if x != nil {
91
+ return x.Data
92
+ }
93
+ return nil
94
+ }
95
+
96
+ func (x *UploadRequest) GetResizeWidth() int32 {
97
+ if x != nil && x.ResizeWidth != nil {
98
+ return *x.ResizeWidth
99
+ }
100
+ return 0
101
+ }
102
+
103
+ func (x *UploadRequest) GetResizeHeight() int32 {
104
+ if x != nil && x.ResizeHeight != nil {
105
+ return *x.ResizeHeight
106
+ }
107
+ return 0
108
+ }
109
+
110
+ type UploadResponse struct {
111
+ state protoimpl.MessageState
112
+ sizeCache protoimpl.SizeCache
113
+ unknownFields protoimpl.UnknownFields
114
+
115
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
116
+ }
117
+
118
+ func (x *UploadResponse) Reset() {
119
+ *x = UploadResponse{}
120
+ if protoimpl.UnsafeEnabled {
121
+ mi := &file_media_proto_msgTypes[1]
122
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
123
+ ms.StoreMessageInfo(mi)
124
+ }
125
+ }
126
+
127
+ func (x *UploadResponse) String() string {
128
+ return protoimpl.X.MessageStringOf(x)
129
+ }
130
+
131
+ func (*UploadResponse) ProtoMessage() {}
132
+
133
+ func (x *UploadResponse) ProtoReflect() protoreflect.Message {
134
+ mi := &file_media_proto_msgTypes[1]
135
+ if protoimpl.UnsafeEnabled && x != nil {
136
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
137
+ if ms.LoadMessageInfo() == nil {
138
+ ms.StoreMessageInfo(mi)
139
+ }
140
+ return ms
141
+ }
142
+ return mi.MessageOf(x)
143
+ }
144
+
145
+ // Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead.
146
+ func (*UploadResponse) Descriptor() ([]byte, []int) {
147
+ return file_media_proto_rawDescGZIP(), []int{1}
148
+ }
149
+
150
+ func (x *UploadResponse) GetKey() string {
151
+ if x != nil {
152
+ return x.Key
153
+ }
154
+ return ""
155
+ }
156
+
157
+ type GetRequest struct {
158
+ state protoimpl.MessageState
159
+ sizeCache protoimpl.SizeCache
160
+ unknownFields protoimpl.UnknownFields
161
+
162
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
163
+ }
164
+
165
+ func (x *GetRequest) Reset() {
166
+ *x = GetRequest{}
167
+ if protoimpl.UnsafeEnabled {
168
+ mi := &file_media_proto_msgTypes[2]
169
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
170
+ ms.StoreMessageInfo(mi)
171
+ }
172
+ }
173
+
174
+ func (x *GetRequest) String() string {
175
+ return protoimpl.X.MessageStringOf(x)
176
+ }
177
+
178
+ func (*GetRequest) ProtoMessage() {}
179
+
180
+ func (x *GetRequest) ProtoReflect() protoreflect.Message {
181
+ mi := &file_media_proto_msgTypes[2]
182
+ if protoimpl.UnsafeEnabled && x != nil {
183
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
184
+ if ms.LoadMessageInfo() == nil {
185
+ ms.StoreMessageInfo(mi)
186
+ }
187
+ return ms
188
+ }
189
+ return mi.MessageOf(x)
190
+ }
191
+
192
+ // Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
193
+ func (*GetRequest) Descriptor() ([]byte, []int) {
194
+ return file_media_proto_rawDescGZIP(), []int{2}
195
+ }
196
+
197
+ func (x *GetRequest) GetKey() string {
198
+ if x != nil {
199
+ return x.Key
200
+ }
201
+ return ""
202
+ }
203
+
204
+ type GetResponse struct {
205
+ state protoimpl.MessageState
206
+ sizeCache protoimpl.SizeCache
207
+ unknownFields protoimpl.UnknownFields
208
+
209
+ Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
210
+ ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
211
+ }
212
+
213
+ func (x *GetResponse) Reset() {
214
+ *x = GetResponse{}
215
+ if protoimpl.UnsafeEnabled {
216
+ mi := &file_media_proto_msgTypes[3]
217
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
218
+ ms.StoreMessageInfo(mi)
219
+ }
220
+ }
221
+
222
+ func (x *GetResponse) String() string {
223
+ return protoimpl.X.MessageStringOf(x)
224
+ }
225
+
226
+ func (*GetResponse) ProtoMessage() {}
227
+
228
+ func (x *GetResponse) ProtoReflect() protoreflect.Message {
229
+ mi := &file_media_proto_msgTypes[3]
230
+ if protoimpl.UnsafeEnabled && x != nil {
231
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
232
+ if ms.LoadMessageInfo() == nil {
233
+ ms.StoreMessageInfo(mi)
234
+ }
235
+ return ms
236
+ }
237
+ return mi.MessageOf(x)
238
+ }
239
+
240
+ // Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
241
+ func (*GetResponse) Descriptor() ([]byte, []int) {
242
+ return file_media_proto_rawDescGZIP(), []int{3}
243
+ }
244
+
245
+ func (x *GetResponse) GetData() []byte {
246
+ if x != nil {
247
+ return x.Data
248
+ }
249
+ return nil
250
+ }
251
+
252
+ func (x *GetResponse) GetContentType() string {
253
+ if x != nil {
254
+ return x.ContentType
255
+ }
256
+ return ""
257
+ }
258
+
259
+ type DeleteRequest struct {
260
+ state protoimpl.MessageState
261
+ sizeCache protoimpl.SizeCache
262
+ unknownFields protoimpl.UnknownFields
263
+
264
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
265
+ }
266
+
267
+ func (x *DeleteRequest) Reset() {
268
+ *x = DeleteRequest{}
269
+ if protoimpl.UnsafeEnabled {
270
+ mi := &file_media_proto_msgTypes[4]
271
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
272
+ ms.StoreMessageInfo(mi)
273
+ }
274
+ }
275
+
276
+ func (x *DeleteRequest) String() string {
277
+ return protoimpl.X.MessageStringOf(x)
278
+ }
279
+
280
+ func (*DeleteRequest) ProtoMessage() {}
281
+
282
+ func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
283
+ mi := &file_media_proto_msgTypes[4]
284
+ if protoimpl.UnsafeEnabled && x != nil {
285
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
286
+ if ms.LoadMessageInfo() == nil {
287
+ ms.StoreMessageInfo(mi)
288
+ }
289
+ return ms
290
+ }
291
+ return mi.MessageOf(x)
292
+ }
293
+
294
+ // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
295
+ func (*DeleteRequest) Descriptor() ([]byte, []int) {
296
+ return file_media_proto_rawDescGZIP(), []int{4}
297
+ }
298
+
299
+ func (x *DeleteRequest) GetKey() string {
300
+ if x != nil {
301
+ return x.Key
302
+ }
303
+ return ""
304
+ }
305
+
306
+ type DeleteResponse struct {
307
+ state protoimpl.MessageState
308
+ sizeCache protoimpl.SizeCache
309
+ unknownFields protoimpl.UnknownFields
310
+
311
+ Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
312
+ }
313
+
314
+ func (x *DeleteResponse) Reset() {
315
+ *x = DeleteResponse{}
316
+ if protoimpl.UnsafeEnabled {
317
+ mi := &file_media_proto_msgTypes[5]
318
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
319
+ ms.StoreMessageInfo(mi)
320
+ }
321
+ }
322
+
323
+ func (x *DeleteResponse) String() string {
324
+ return protoimpl.X.MessageStringOf(x)
325
+ }
326
+
327
+ func (*DeleteResponse) ProtoMessage() {}
328
+
329
+ func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
330
+ mi := &file_media_proto_msgTypes[5]
331
+ if protoimpl.UnsafeEnabled && x != nil {
332
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
333
+ if ms.LoadMessageInfo() == nil {
334
+ ms.StoreMessageInfo(mi)
335
+ }
336
+ return ms
337
+ }
338
+ return mi.MessageOf(x)
339
+ }
340
+
341
+ // Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
342
+ func (*DeleteResponse) Descriptor() ([]byte, []int) {
343
+ return file_media_proto_rawDescGZIP(), []int{5}
344
+ }
345
+
346
+ func (x *DeleteResponse) GetOk() bool {
347
+ if x != nil {
348
+ return x.Ok
349
+ }
350
+ return false
351
+ }
352
+
353
+ var File_media_proto protoreflect.FileDescriptor
354
+
355
+ var file_media_proto_rawDesc = []byte{
356
+ 0x0a, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6d,
357
+ 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x22, 0xf0, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x6c, 0x6f,
358
+ 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c,
359
+ 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69,
360
+ 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72,
361
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x21,
362
+ 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,
363
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
364
+ 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
365
+ 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x5f,
366
+ 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0b, 0x72,
367
+ 0x65, 0x73, 0x69, 0x7a, 0x65, 0x57, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a,
368
+ 0x0d, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06,
369
+ 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x48, 0x65,
370
+ 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, 0x69,
371
+ 0x7a, 0x65, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73,
372
+ 0x69, 0x7a, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x22, 0x0a, 0x0e, 0x55, 0x70,
373
+ 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03,
374
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x1e,
375
+ 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
376
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x44,
377
+ 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
378
+ 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74,
379
+ 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70,
380
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
381
+ 0x54, 0x79, 0x70, 0x65, 0x22, 0x21, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
382
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
383
+ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x20, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74,
384
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18,
385
+ 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x32, 0xbc, 0x01, 0x0a, 0x0c, 0x4d, 0x65,
386
+ 0x64, 0x69, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x55, 0x70,
387
+ 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e,
388
+ 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e,
389
+ 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52,
390
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x14,
391
+ 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71,
392
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e,
393
+ 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x44,
394
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31,
395
+ 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18,
396
+ 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
397
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68,
398
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x61, 0x72, 0x2d, 0x6d, 0x69, 0x63, 0x72, 0x6f,
399
+ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
400
+ 0x74, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2f,
401
+ 0x76, 0x31, 0x3b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
402
+ 0x6f, 0x33,
403
+ }
404
+
405
+ var (
406
+ file_media_proto_rawDescOnce sync.Once
407
+ file_media_proto_rawDescData = file_media_proto_rawDesc
408
+ )
409
+
410
+ func file_media_proto_rawDescGZIP() []byte {
411
+ file_media_proto_rawDescOnce.Do(func() {
412
+ file_media_proto_rawDescData = protoimpl.X.CompressGZIP(file_media_proto_rawDescData)
413
+ })
414
+ return file_media_proto_rawDescData
415
+ }
416
+
417
+ var file_media_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
418
+ var file_media_proto_goTypes = []interface{}{
419
+ (*UploadRequest)(nil), // 0: media.v1.UploadRequest
420
+ (*UploadResponse)(nil), // 1: media.v1.UploadResponse
421
+ (*GetRequest)(nil), // 2: media.v1.GetRequest
422
+ (*GetResponse)(nil), // 3: media.v1.GetResponse
423
+ (*DeleteRequest)(nil), // 4: media.v1.DeleteRequest
424
+ (*DeleteResponse)(nil), // 5: media.v1.DeleteResponse
425
+ }
426
+ var file_media_proto_depIdxs = []int32{
427
+ 0, // 0: media.v1.MediaService.Upload:input_type -> media.v1.UploadRequest
428
+ 2, // 1: media.v1.MediaService.Get:input_type -> media.v1.GetRequest
429
+ 4, // 2: media.v1.MediaService.Delete:input_type -> media.v1.DeleteRequest
430
+ 1, // 3: media.v1.MediaService.Upload:output_type -> media.v1.UploadResponse
431
+ 3, // 4: media.v1.MediaService.Get:output_type -> media.v1.GetResponse
432
+ 5, // 5: media.v1.MediaService.Delete:output_type -> media.v1.DeleteResponse
433
+ 3, // [3:6] is the sub-list for method output_type
434
+ 0, // [0:3] is the sub-list for method input_type
435
+ 0, // [0:0] is the sub-list for extension type_name
436
+ 0, // [0:0] is the sub-list for extension extendee
437
+ 0, // [0:0] is the sub-list for field type_name
438
+ }
439
+
440
+ func init() { file_media_proto_init() }
441
+ func file_media_proto_init() {
442
+ if File_media_proto != nil {
443
+ return
444
+ }
445
+ if !protoimpl.UnsafeEnabled {
446
+ file_media_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
447
+ switch v := v.(*UploadRequest); i {
448
+ case 0:
449
+ return &v.state
450
+ case 1:
451
+ return &v.sizeCache
452
+ case 2:
453
+ return &v.unknownFields
454
+ default:
455
+ return nil
456
+ }
457
+ }
458
+ file_media_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
459
+ switch v := v.(*UploadResponse); i {
460
+ case 0:
461
+ return &v.state
462
+ case 1:
463
+ return &v.sizeCache
464
+ case 2:
465
+ return &v.unknownFields
466
+ default:
467
+ return nil
468
+ }
469
+ }
470
+ file_media_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
471
+ switch v := v.(*GetRequest); i {
472
+ case 0:
473
+ return &v.state
474
+ case 1:
475
+ return &v.sizeCache
476
+ case 2:
477
+ return &v.unknownFields
478
+ default:
479
+ return nil
480
+ }
481
+ }
482
+ file_media_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
483
+ switch v := v.(*GetResponse); i {
484
+ case 0:
485
+ return &v.state
486
+ case 1:
487
+ return &v.sizeCache
488
+ case 2:
489
+ return &v.unknownFields
490
+ default:
491
+ return nil
492
+ }
493
+ }
494
+ file_media_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
495
+ switch v := v.(*DeleteRequest); i {
496
+ case 0:
497
+ return &v.state
498
+ case 1:
499
+ return &v.sizeCache
500
+ case 2:
501
+ return &v.unknownFields
502
+ default:
503
+ return nil
504
+ }
505
+ }
506
+ file_media_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
507
+ switch v := v.(*DeleteResponse); i {
508
+ case 0:
509
+ return &v.state
510
+ case 1:
511
+ return &v.sizeCache
512
+ case 2:
513
+ return &v.unknownFields
514
+ default:
515
+ return nil
516
+ }
517
+ }
518
+ }
519
+ file_media_proto_msgTypes[0].OneofWrappers = []interface{}{}
520
+ type x struct{}
521
+ out := protoimpl.TypeBuilder{
522
+ File: protoimpl.DescBuilder{
523
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
524
+ RawDescriptor: file_media_proto_rawDesc,
525
+ NumEnums: 0,
526
+ NumMessages: 6,
527
+ NumExtensions: 0,
528
+ NumServices: 1,
529
+ },
530
+ GoTypes: file_media_proto_goTypes,
531
+ DependencyIndexes: file_media_proto_depIdxs,
532
+ MessageInfos: file_media_proto_msgTypes,
533
+ }.Build()
534
+ File_media_proto = out.File
535
+ file_media_proto_rawDesc = nil
536
+ file_media_proto_goTypes = nil
537
+ file_media_proto_depIdxs = nil
538
+ }
@@ -0,0 +1,190 @@
1
+ // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
+ // versions:
3
+ // - protoc-gen-go-grpc v1.4.0
4
+ // - protoc v7.34.1
5
+ // source: media.proto
6
+
7
+ package mediav1
8
+
9
+ import (
10
+ context "context"
11
+ grpc "google.golang.org/grpc"
12
+ codes "google.golang.org/grpc/codes"
13
+ status "google.golang.org/grpc/status"
14
+ )
15
+
16
+ // This is a compile-time assertion to ensure that this generated file
17
+ // is compatible with the grpc package it is being compiled against.
18
+ // Requires gRPC-Go v1.62.0 or later.
19
+ const _ = grpc.SupportPackageIsVersion8
20
+
21
+ const (
22
+ MediaService_Upload_FullMethodName = "/media.v1.MediaService/Upload"
23
+ MediaService_Get_FullMethodName = "/media.v1.MediaService/Get"
24
+ MediaService_Delete_FullMethodName = "/media.v1.MediaService/Delete"
25
+ )
26
+
27
+ // MediaServiceClient is the client API for MediaService service.
28
+ //
29
+ // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
30
+ //
31
+ // Сервис на GO
32
+ type MediaServiceClient interface {
33
+ Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error)
34
+ Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
35
+ Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
36
+ }
37
+
38
+ type mediaServiceClient struct {
39
+ cc grpc.ClientConnInterface
40
+ }
41
+
42
+ func NewMediaServiceClient(cc grpc.ClientConnInterface) MediaServiceClient {
43
+ return &mediaServiceClient{cc}
44
+ }
45
+
46
+ func (c *mediaServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error) {
47
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
48
+ out := new(UploadResponse)
49
+ err := c.cc.Invoke(ctx, MediaService_Upload_FullMethodName, in, out, cOpts...)
50
+ if err != nil {
51
+ return nil, err
52
+ }
53
+ return out, nil
54
+ }
55
+
56
+ func (c *mediaServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
57
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
58
+ out := new(GetResponse)
59
+ err := c.cc.Invoke(ctx, MediaService_Get_FullMethodName, in, out, cOpts...)
60
+ if err != nil {
61
+ return nil, err
62
+ }
63
+ return out, nil
64
+ }
65
+
66
+ func (c *mediaServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
67
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
68
+ out := new(DeleteResponse)
69
+ err := c.cc.Invoke(ctx, MediaService_Delete_FullMethodName, in, out, cOpts...)
70
+ if err != nil {
71
+ return nil, err
72
+ }
73
+ return out, nil
74
+ }
75
+
76
+ // MediaServiceServer is the server API for MediaService service.
77
+ // All implementations must embed UnimplementedMediaServiceServer
78
+ // for forward compatibility
79
+ //
80
+ // Сервис на GO
81
+ type MediaServiceServer interface {
82
+ Upload(context.Context, *UploadRequest) (*UploadResponse, error)
83
+ Get(context.Context, *GetRequest) (*GetResponse, error)
84
+ Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
85
+ mustEmbedUnimplementedMediaServiceServer()
86
+ }
87
+
88
+ // UnimplementedMediaServiceServer must be embedded to have forward compatible implementations.
89
+ type UnimplementedMediaServiceServer struct {
90
+ }
91
+
92
+ func (UnimplementedMediaServiceServer) Upload(context.Context, *UploadRequest) (*UploadResponse, error) {
93
+ return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented")
94
+ }
95
+ func (UnimplementedMediaServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
96
+ return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
97
+ }
98
+ func (UnimplementedMediaServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
99
+ return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
100
+ }
101
+ func (UnimplementedMediaServiceServer) mustEmbedUnimplementedMediaServiceServer() {}
102
+
103
+ // UnsafeMediaServiceServer may be embedded to opt out of forward compatibility for this service.
104
+ // Use of this interface is not recommended, as added methods to MediaServiceServer will
105
+ // result in compilation errors.
106
+ type UnsafeMediaServiceServer interface {
107
+ mustEmbedUnimplementedMediaServiceServer()
108
+ }
109
+
110
+ func RegisterMediaServiceServer(s grpc.ServiceRegistrar, srv MediaServiceServer) {
111
+ s.RegisterService(&MediaService_ServiceDesc, srv)
112
+ }
113
+
114
+ func _MediaService_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
115
+ in := new(UploadRequest)
116
+ if err := dec(in); err != nil {
117
+ return nil, err
118
+ }
119
+ if interceptor == nil {
120
+ return srv.(MediaServiceServer).Upload(ctx, in)
121
+ }
122
+ info := &grpc.UnaryServerInfo{
123
+ Server: srv,
124
+ FullMethod: MediaService_Upload_FullMethodName,
125
+ }
126
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
127
+ return srv.(MediaServiceServer).Upload(ctx, req.(*UploadRequest))
128
+ }
129
+ return interceptor(ctx, in, info, handler)
130
+ }
131
+
132
+ func _MediaService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
133
+ in := new(GetRequest)
134
+ if err := dec(in); err != nil {
135
+ return nil, err
136
+ }
137
+ if interceptor == nil {
138
+ return srv.(MediaServiceServer).Get(ctx, in)
139
+ }
140
+ info := &grpc.UnaryServerInfo{
141
+ Server: srv,
142
+ FullMethod: MediaService_Get_FullMethodName,
143
+ }
144
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
145
+ return srv.(MediaServiceServer).Get(ctx, req.(*GetRequest))
146
+ }
147
+ return interceptor(ctx, in, info, handler)
148
+ }
149
+
150
+ func _MediaService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
151
+ in := new(DeleteRequest)
152
+ if err := dec(in); err != nil {
153
+ return nil, err
154
+ }
155
+ if interceptor == nil {
156
+ return srv.(MediaServiceServer).Delete(ctx, in)
157
+ }
158
+ info := &grpc.UnaryServerInfo{
159
+ Server: srv,
160
+ FullMethod: MediaService_Delete_FullMethodName,
161
+ }
162
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
163
+ return srv.(MediaServiceServer).Delete(ctx, req.(*DeleteRequest))
164
+ }
165
+ return interceptor(ctx, in, info, handler)
166
+ }
167
+
168
+ // MediaService_ServiceDesc is the grpc.ServiceDesc for MediaService service.
169
+ // It's only intended for direct use with grpc.RegisterService,
170
+ // and not to be introspected or modified (even as a copy)
171
+ var MediaService_ServiceDesc = grpc.ServiceDesc{
172
+ ServiceName: "media.v1.MediaService",
173
+ HandlerType: (*MediaServiceServer)(nil),
174
+ Methods: []grpc.MethodDesc{
175
+ {
176
+ MethodName: "Upload",
177
+ Handler: _MediaService_Upload_Handler,
178
+ },
179
+ {
180
+ MethodName: "Get",
181
+ Handler: _MediaService_Get_Handler,
182
+ },
183
+ {
184
+ MethodName: "Delete",
185
+ Handler: _MediaService_Delete_Handler,
186
+ },
187
+ },
188
+ Streams: []grpc.StreamDesc{},
189
+ Metadata: "media.proto",
190
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarcinema/contracts",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",