-
Notifications
You must be signed in to change notification settings - Fork 0
/
msg.proto
716 lines (698 loc) · 14.9 KB
/
msg.proto
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
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
syntax = "proto3";
// zveloAPI
package zvelo.msg;
option go_package = "msgpb";
option java_multiple_files = true;
option java_outer_classname = "MsgProto";
option java_package = "com.zvelo.msg";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
enum Category {
UNKNOWN_CATEGORY = 0;
ABORTION_4 = 10001;
PROCHOICE_4 = 10002;
PROLIFE_4 = 10003;
PG13_4 = 10004;
GAMBLING_4 = 10005;
GAY_4 = 10006;
LINGERIE_4 = 10007;
NUDITY_4 = 10008;
PORN_4 = 10009;
PROFANITY_4 = 10010;
RATEDR_4 = 10011;
SEX_4 = 10012;
EDSEX_4 = 10013;
TOBACCO_4 = 10014;
MIL_4 = 10015;
VIOLENCE_4 = 10016;
WEAPONS_4 = 10017;
AGGRESSIVE_4 = 10018;
FINEART_4 = 10019;
ART_4 = 10020;
AUTOPARTS_4 = 10021;
AUTOREPAIR_4 = 10022;
BUYSELLCAR_4 = 10023;
CARCULTURE_4 = 10024;
CPO_4 = 10025;
CARCONVERT_4 = 10026;
COUPE_4 = 10027;
CUV_4 = 10028;
DIESEL_4 = 10029;
EVEHICLE_4 = 10030;
HATCHBACK_4 = 10031;
HYBRIDCAR_4 = 10032;
LUXURYCAR_4 = 10033;
MINIVAN_4 = 10034;
MOTORCYCLE_4 = 10035;
OFFROAD_4 = 10036;
PERFCAR_4 = 10037;
PICKUP_4 = 10038;
ROADASSIST_4 = 10039;
SEDAN_4 = 10040;
TRUCK_4 = 10041;
VINTAGECAR_4 = 10042;
WAGON_4 = 10043;
AUTOMOTIVE_4 = 10044;
AG_4 = 10045;
BIOTECH_4 = 10046;
BIZSOFT_4 = 10047;
BUILD_4 = 10048;
FORESTRY_4 = 10049;
BIZGOV_4 = 10050;
NATURE_4 = 10051;
FURNITURE_4 = 10052;
HR_4 = 10053;
MFG_4 = 10054;
MKTG_4 = 10055;
METAL_4 = 10056;
PHYSEC_4 = 10057;
BIZPROD_4 = 10058;
RETIREHOME_4 = 10059;
SHIPPING_4 = 10060;
BUSINESS_4 = 10061;
JOBADVICE_4 = 10062;
CAREERPLAN_4 = 10063;
COLJOB_4 = 10064;
FINAID_4 = 10065;
JOBFAIR_4 = 10066;
JOBSEARCH_4 = 10067;
NURSING_4 = 10068;
RESUME_4 = 10069;
SCHOLAR_4 = 10070;
TELCOMMUTE_4 = 10071;
MILJOBS_4 = 10072;
CAREER_4 = 10073;
CHILDABUSE_4 = 10074;
CRIMSKILL_4 = 10075;
HACKING_4 = 10076;
HATE_4 = 10077;
DRUGS_4 = 10078;
POT_4 = 10079;
WAREZ_4 = 10080;
EDUCHEAT_4 = 10081;
SELFHARM_4 = 10082;
TORRENT_4 = 10083;
CRIM_4 = 10084;
ANON_4 = 10085;
CHAT_4 = 10086;
GROUPS_4 = 10087;
IM_4 = 10088;
LOGIN_4 = 10089;
BLOG_4 = 10090;
PHOTO_4 = 10091;
PROFNET_4 = 10092;
REDIR_4 = 10093;
SOCNET_4 = 10094;
SMS_4 = 10095;
TRANSLATOR_4 = 10096;
EMAIL_4 = 10097;
CARDS_4 = 10098;
EDU712_4 = 10099;
ADULTEDU_4 = 10100;
ARTHISTORY_4 = 10101;
COLADMIN_4 = 10102;
COLLIFE_4 = 10103;
DLEARNING_4 = 10104;
SCHOOL_4 = 10105;
EDSTUDIES_4 = 10106;
ENGLISH_4 = 10107;
GRADSCHOOL_4 = 10108;
HOMESCHOOL_4 = 10109;
HOMEWORK_4 = 10110;
K6EDU_4 = 10111;
LANGUAGE_4 = 10112;
BOOK_4 = 10113;
PRIVSCHOOL_4 = 10114;
REF_4 = 10115;
SPED_4 = 10116;
BIZEDU_4 = 10117;
TUTOR_4 = 10118;
WIKI_4 = 10119;
EDU_4 = 10120;
ENTNEWS_4 = 10121;
VENUE_4 = 10122;
HUMOR_4 = 10123;
MOVIE_4 = 10124;
MUSIC_4 = 10125;
AUDIO_4 = 10126;
VIDEO_4 = 10127;
TV_4 = 10128;
ENT_4 = 10129;
ADOPT_4 = 10130;
TODDLER_4 = 10131;
PRESCHOOL_4 = 10132;
ELDERCARE_4 = 10133;
FAMILYNET_4 = 10134;
K6PARENT_4 = 10135;
PARENTEEN_4 = 10136;
PREGNANCY_4 = 10137;
SNKPARENT_4 = 10138;
FAMILY_4 = 10139;
ACCESSORY_4 = 10140;
BEAUTY_4 = 10141;
BODYART_4 = 10142;
CLOTHING_4 = 10143;
FASHNMISC_4 = 10144;
JEWELRY_4 = 10145;
SWIMSUIT_4 = 10146;
FASHION_4 = 10147;
ACCTG_4 = 10148;
BANK_4 = 10149;
BGNINVEST_4 = 10150;
LOAN_4 = 10151;
FINNEWS_4 = 10152;
FINPLAN_4 = 10153;
HEDGEFUND_4 = 10154;
INSURANCE_4 = 10155;
INVEST_4 = 10156;
MUTUALFUND_4 = 10157;
QUOTES_4 = 10158;
FINANCEOPT_4 = 10159;
RETIREPLAN_4 = 10160;
STOCKS_4 = 10161;
TAX_4 = 10162;
FINANCE_4 = 10163;
USFOOD_4 = 10164;
BBQ_4 = 10165;
CAJUNFOOD_4 = 10166;
ZHFOOD_4 = 10167;
COCKTAIL_4 = 10168;
COFFEE_4 = 10169;
CUISINE_4 = 10170;
DESSERT_4 = 10171;
DININGOUT_4 = 10172;
FUDALLERGY_4 = 10173;
FRFOOD_4 = 10174;
LOWFAT_4 = 10175;
ITFOOD_4 = 10176;
JAFOOD_4 = 10177;
MXFOOD_4 = 10178;
VEGAN_4 = 10179;
VEGETARIAN_4 = 10180;
WINE_4 = 10181;
FOOD_4 = 10182;
ADHD_4 = 10183;
AIDS_4 = 10184;
ALLERGY_4 = 10185;
ALTMED_4 = 10186;
ARTHRITIS_4 = 10187;
ASTHMA_4 = 10188;
AUTISM_4 = 10189;
BIPOLAR_4 = 10190;
TUMOR_4 = 10191;
CANCER_4 = 10192;
KIDHEALTH_4 = 10193;
CHOLESTER_4 = 10194;
FATIGUE_4 = 10195;
PAIN_4 = 10196;
FLU_4 = 10197;
PSURGERY_4 = 10198;
DEAFNESS_4 = 10199;
DENTAL_4 = 10200;
DEPRESSION_4 = 10201;
DERMA_4 = 10202;
DIABETES_4 = 10203;
DISORDER_4 = 10204;
EPILEPSY_4 = 10205;
EXERCISE_4 = 10206;
GERD_4 = 10207;
MIGRAINE_4 = 10208;
CARDIO_4 = 10209;
HERB_4 = 10210;
HOLISTIC_4 = 10211;
IBS_4 = 10212;
ABUSE_4 = 10213;
INCNTNENCE_4 = 10214;
INFERTILE_4 = 10215;
MENHEALTH_4 = 10216;
DIET_4 = 10217;
ORTHO_4 = 10218;
ANXIETY_4 = 10219;
PEDIA_4 = 10220;
RX_4 = 10221;
PHYTHERAPY_4 = 10222;
PSYCH_4 = 10223;
ADDICTION_4 = 10224;
SRHEALTH_4 = 10225;
SEXUALITY_4 = 10226;
SLEEP_4 = 10227;
QUITSMOKE_4 = 10228;
VITAMINS_4 = 10229;
SYNDROME_4 = 10230;
THYROID_4 = 10231;
WEIGHTLOSS_4 = 10232;
FEMHEALTH_4 = 10233;
HEALTH_4 = 10234;
ARTTECH_4 = 10235;
ARTCRAFT_4 = 10236;
BEADWORK_4 = 10237;
BIRDWATCH_4 = 10238;
PUZZLE_4 = 10239;
CANDLE_4 = 10240;
CARDGAME_4 = 10241;
CARTOON_4 = 10242;
CHESS_4 = 10243;
CIGAR_4 = 10244;
COLLECT_4 = 10245;
COMIC_4 = 10246;
DRAW_4 = 10247;
WRITE_4 = 10248;
GENEALOGY_4 = 10249;
PUBLISH_4 = 10250;
GUITAR_4 = 10251;
HOMERECORD_4 = 10252;
PATENT_4 = 10253;
MAKEJEWEL_4 = 10254;
MAGIC_4 = 10255;
NEEDLEWORK_4 = 10256;
PAINT_4 = 10257;
PHOTOHOB_4 = 10258;
RADIO_4 = 10259;
RPG_4 = 10260;
SCIFI_4 = 10261;
SCRAPBOOK_4 = 10262;
SCREENWRT_4 = 10263;
STAMP_4 = 10264;
THEME_4 = 10265;
VIDEOGAME_4 = 10266;
WOODWORK_4 = 10267;
HOBBY_4 = 10268;
APPLIANCE_4 = 10269;
ENTHOME_4 = 10270;
ECOSAFETY_4 = 10271;
GARDEN_4 = 10272;
HOMEREPAIR_4 = 10273;
HOMECINEMA_4 = 10274;
INTERIOR_4 = 10275;
LANDSCAPE_4 = 10276;
REMODEL_4 = 10277;
HOME_4 = 10278;
GAMES_4 = 10279;
KIDSPAGE_4 = 10280;
TOYS_4 = 10281;
KIDS_4 = 10282;
DATING_4 = 10283;
DIVORCE_4 = 10284;
ETHNIC_4 = 10285;
MARRIAGE_4 = 10286;
PARKS_4 = 10287;
SENIOR_4 = 10288;
TEENS_4 = 10289;
WEDDING_4 = 10290;
LIFESTYLE_4 = 10291;
ADFRAUD_4 = 10292;
BOTS_4 = 10293;
CANDC_4 = 10294;
COMPR_4 = 10295;
MALHOME_4 = 10296;
MAL_4 = 10297;
FRAUD_4 = 10298;
SPAM_4 = 10299;
SPYWARE_4 = 10300;
CDN_4 = 10301;
BLANK_4 = 10302;
PARKED_4 = 10303;
PRIVIP_4 = 10304;
BROKEN_4 = 10305;
MISC_4 = 10306;
IMGSEARCH_4 = 10307;
INTLNEWS_4 = 10308;
LOCALNEWS_4 = 10309;
MAGAZINES_4 = 10310;
NATLNEWS_4 = 10311;
PORTAL_4 = 10312;
SEARCH_4 = 10313;
NEWS_4 = 10314;
PAYTOSURF_4 = 10315;
ADWARE_4 = 10316;
AQUARIUM_4 = 10317;
BIRD_4 = 10318;
CAT_4 = 10319;
DOG_4 = 10320;
BIGANIMALS_4 = 10321;
REPTILE_4 = 10322;
VETMED_4 = 10323;
PETS_4 = 10324;
ADVOCACY_4 = 10325;
COMMENTARY_4 = 10326;
GOVSPONSOR_4 = 10327;
IMMIGRANT_4 = 10328;
LEGAL_4 = 10329;
CHARITY_4 = 10330;
POLITICS_4 = 10331;
CLUBS_4 = 10332;
USRESOURCE_4 = 10333;
GOV_4 = 10334;
APARTMENT_4 = 10335;
ARCHI_4 = 10336;
BNSHOME_4 = 10337;
PROP_4 = 10338;
ALTRELGN_4 = 10339;
ATHEISM_4 = 10340;
BUDDHISM_4 = 10341;
CATHOLIC_4 = 10342;
CHRISTIAN_4 = 10343;
HINDU_4 = 10344;
ISLAM_4 = 10345;
JUDAISM_4 = 10346;
LDS_4 = 10347;
CULT_4 = 10348;
PAGAN_4 = 10349;
RELIGION_4 = 10350;
ANATOMY_4 = 10351;
ASTROLOGY_4 = 10352;
BIOLOGY_4 = 10353;
BOTANY_4 = 10354;
CHEMISTRY_4 = 10355;
GEOGRAPHY_4 = 10356;
GEOLOGY_4 = 10357;
PARANORMAL_4 = 10358;
PHYSICS_4 = 10359;
ASTRONOMY_4 = 10360;
WEATHER_4 = 10361;
SCIENCE_4 = 10362;
P2PSHOP_4 = 10363;
CATALOG_4 = 10364;
SURVEY_4 = 10365;
COUPON_4 = 10366;
SHOPENGINE_4 = 10367;
ONLINESHOP_4 = 10368;
SHOPSEARCH_4 = 10369;
SHOP_4 = 10370;
AUTORACE_4 = 10371;
BASEBALL_4 = 10372;
BICYCLING_4 = 10373;
BODYBUILD_4 = 10374;
BOXING_4 = 10375;
KAYAK_4 = 10376;
CHEERLEAD_4 = 10377;
CLIMB_4 = 10378;
CRICKET_4 = 10379;
FIGSKATE_4 = 10380;
FLYFISHING_4 = 10381;
FOOTBALL_4 = 10382;
FRESHFISH_4 = 10383;
GAMEFISH_4 = 10384;
GOLF_4 = 10385;
HORSERACE_4 = 10386;
HORSES_4 = 10387;
INSKATE_4 = 10388;
MARTIALART_4 = 10389;
BIKING_4 = 10390;
NASCAR_4 = 10391;
OLYMPICS_4 = 10392;
PAINTBALL_4 = 10393;
MOTORACE_4 = 10394;
PROBASKET_4 = 10395;
ICEHOCKEY_4 = 10396;
RODEO_4 = 10397;
RUGBY_4 = 10398;
RUN_4 = 10399;
SAIL_4 = 10400;
SALTFISH_4 = 10401;
SCUBA_4 = 10402;
SKATEBOARD_4 = 10403;
SKI_4 = 10404;
SNOWBOARD_4 = 10405;
HUNT_4 = 10406;
SURF_4 = 10407;
SWIM_4 = 10408;
PINGPONG_4 = 10409;
TENNIS_4 = 10410;
VOLLEYBALL_4 = 10411;
WALK_4 = 10412;
WATERSKI_4 = 10413;
SOCCER_4 = 10414;
SPORTS_4 = 10415;
GRAPHICS3D_4 = 10416;
ANIMATION_4 = 10417;
ANTIVIRUS_4 = 10418;
CLANG_4 = 10419;
CAMERA_4 = 10420;
COMPCERT_4 = 10421;
COMPNET_4 = 10422;
PERIPHERAL_4 = 10423;
COMPREVIEW_4 = 10424;
DATABASE_4 = 10425;
DESKPUB_4 = 10426;
DESKVID_4 = 10427;
TECHENT_4 = 10428;
REPOS_4 = 10429;
GRAPHICS_4 = 10430;
DVD_4 = 10431;
COMPSEC_4 = 10432;
VOIP_4 = 10433;
INTERNET_4 = 10434;
JAVA_4 = 10435;
JAVASCRIPT_4 = 10436;
LINUX_4 = 10437;
MAC_4 = 10438;
MACSUPPORT_4 = 10439;
MOBILE_4 = 10440;
MP3_4 = 10441;
NETCON_4 = 10442;
NETBEG_4 = 10443;
NETSEC_4 = 10444;
OFFICE_4 = 10445;
PDA_4 = 10446;
PCSUPPORT_4 = 10447;
P2P_4 = 10448;
STORAGE_4 = 10449;
PORTABLE_4 = 10450;
VPN_4 = 10451;
FREEWARE_4 = 10452;
UNIX_4 = 10453;
UTILITIES_4 = 10454;
VBASIC_4 = 10455;
CLIPART_4 = 10456;
WEBDESIGN_4 = 10457;
ISP_4 = 10458;
WINDOWS_4 = 10459;
TECH_4 = 10460;
ADVENTURE_4 = 10461;
AFRICA_4 = 10462;
AIRTRAVEL_4 = 10463;
AUSTRALIA_4 = 10464;
BNB_4 = 10465;
BDGTTRAVEL_4 = 10466;
BIZTRAVEL_4 = 10467;
USTRAVEL_4 = 10468;
CAMP_4 = 10469;
CANADA_4 = 10470;
CARIBBEAN_4 = 10471;
CRUISE_4 = 10472;
EASTEUROPE_4 = 10473;
EUROPE_4 = 10474;
FRANCE_4 = 10475;
GREECE_4 = 10476;
GETAWAY_4 = 10477;
HOTEL_4 = 10478;
ITALY_4 = 10479;
JAPAN_4 = 10480;
MEXICO_4 = 10481;
NATLPARKS_4 = 10482;
NAVIGATION_4 = 10483;
SAMERICA_4 = 10484;
SPA_4 = 10485;
THEMEPARK_4 = 10486;
KIDTRAVEL_4 = 10487;
UKTRAVEL_4 = 10488;
TRAVEL_4 = 10489;
TERRORISM_4 = 10490;
CRYPTOCUR_4 = 10491;
CRYPTOMINE_4 = 10492;
BLOCKCHAIN_4 = 10493;
FAKENEWS_4 = 10494;
API_4 = 10495;
IOT_4 = 10496;
AI_ML_4 = 10497;
}
enum Group {
GROUP_UNKNOWN = 0;
GROUP_ADULT = 1;
GROUP_AGGRESSIVE = 2;
GROUP_ARTS = 3;
GROUP_AUTOMOTIVE = 4;
GROUP_BUSINESS = 5;
GROUP_CAREERS = 6;
GROUP_CRIMINAL_ACTIVITIES = 7;
GROUP_DYNAMIC = 8;
GROUP_EDUCATION = 9;
GROUP_ENTERTAINMENT = 10;
GROUP_FAMILY_AND_PARENTING = 11;
GROUP_FASHION = 12;
GROUP_FINANCE = 13;
GROUP_FOOD_AND_DRINK = 14;
GROUP_HEALTH = 15;
GROUP_HOBBIES_AND_INTERESTS = 16;
GROUP_HOME_AND_GARDEN = 17;
GROUP_KIDS = 18;
GROUP_LIFESTYLE = 19;
GROUP_MALICIOUS = 20;
GROUP_MISCELLANEOUS = 21;
GROUP_NEWS_PORTAL_AND_SEARCH = 22;
GROUP_ONLINE_ADS = 23;
GROUP_PETS = 24;
GROUP_PUBLIC_GOVERNMENT_AND_LAW = 25;
GROUP_REAL_ESTATE = 26;
GROUP_RELIGION = 27;
GROUP_SCIENCE = 28;
GROUP_SHOPPING = 29;
GROUP_SPORTS = 30;
GROUP_TECHNOLOGY = 31;
GROUP_TRAVEL = 32;
}
message Status {
// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
int32 code = 1;
// A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
string message = 2;
}
message RequestID {
string request_id = 1;
}
message Suggestion {
string url = 1;
Dataset dataset = 2;
}
// QueryStatus
message QueryStatus {
bool complete = 1;
Status error = 2;
// the http status code received from the server when fetching a url
int32 fetch_code = 3;
// fetching the url resulted in a redirect to this location
string location = 4;
}
// QueryResult
message QueryResult {
// Request ID for tracking requests
string request_id = 1;
reserved 2;
reserved 3;
reserved 4;
reserved 5;
reserved 6;
Dataset response_dataset = 7;
string url = 8;
reserved 9;
QueryStatus query_status = 10;
}
message URLContent {
reserved 1;
// url the content came from, not required
string url = 2;
// headers
//
// header key/value pairs
map<string, string> header = 3;
// the actual content to process. required
string content = 4;
}
// QueryRequests
message QueryRequests {
// The URLs to categorize
repeated string url = 1;
// The content to categorize
repeated URLContent content = 2;
// The callback url will receive the final result
string callback = 3;
reserved 4;
// The datasets to query for each URL
repeated DatasetType dataset = 5;
}
// QueryReply
message QueryReply {
reserved 1;
// will identify the request after submission
string request_id = 2;
reserved 3;
Status error = 4;
}
// If a request contained more then one URL, or piece of content, we will reply
// with this reply. Each sub-query should be reflected in the replies field, and
// with their own status. The position in the array will correspond to the index
// in the original array of URL or Content provided in the QueryRequests message
// QueryReplies
message QueryReplies {
repeated QueryReply reply = 1; // this contains a reply for each sub query
}
enum DatasetType {
CATEGORIZATION = 0;
// 1 is reserved
// 2 is reserved
// 3 is reserved
MALICIOUS = 4;
ECHO = 5; // for internal zvelo use only
// 6 is reserved
LANGUAGE = 7;
}
// Dataset
message Dataset {
// Categorization
message Categorization {
reserved 1;
reserved 2;
repeated Category value = 3;
Status error = 4;
}
message Language {
string code = 1;
Status error = 2;
}
// Malicious
message Malicious {
reserved 1;
reserved 2;
reserved 3;
reserved 4;
reserved 5;
reserved 6;
reserved 7;
Status error = 8;
repeated Category category = 9;
}
// Echo
message Echo {
string url = 1;
Status error = 2;
}
Categorization categorization = 1;
reserved 2;
reserved 3;
reserved 4;
Malicious malicious = 5;
Echo echo = 6;
reserved 7;
Language language = 8;
}
service APIv1 {
// Create new query
rpc Query(QueryRequests) returns (QueryReplies) {
option (google.api.http) = {
post: "/v1/query"
body: "*"
};
}
// Results of active or unexpired query
rpc Result(RequestID) returns (QueryResult) {
option (google.api.http) = {
get: "/v1/query/{request_id}"
};
}
// Suggest new datasets for a URL
rpc Suggest(Suggestion) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1/suggest"
body: "*"
};
}
// Stream returns all QueryResult messages processed by zveloAPI
rpc Stream(google.protobuf.Empty) returns (stream QueryResult) {
option (google.api.http) = {
get: "/v1/stream"
};
}
}