@barumetric/contracts 1.4.1 → 1.4.3

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