添加若干grpc接口的proto定义

This commit is contained in:
SocialSisterYi
2021-01-03 15:41:20 +08:00
parent 27a5968ebc
commit fe77d8aae7
14 changed files with 1767 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
syntax = "proto3";
package bilibili.metadata.device;
//环境参数1
//x-bili-device-bin
message Device{
int32 appId = 1;
int32 build = 2;
string buvid = 3;
string mobiApp = 4;
string platform = 5;
string device = 6;
string channel = 7;
string brand = 8;
string model = 9;
string osver = 10;
string fpLocal = 11;
string fpRemote = 12;
string versionName = 13;
}

View File

@@ -0,0 +1,10 @@
syntax = "proto3";
package bilibili.metadata.locale;
//区域标识
//x-bili-locale-bin
message LocaleIds{
string language = 1;
string script = 2;
string region = 3;
}

View File

@@ -0,0 +1,23 @@
syntax = "proto3";
package bilibili.metadata;
//环境参数2
//x-bili-metadata-bin
message Metadata{
string accessKey = 1;
string mobiApp = 2;
string device = 3;
int32 build = 4;
string channel = 5;
string buvid = 6;
string platform = 7;
}
import "google/protobuf/any.proto";
//接口回复报错信息
//grpc-status-details-bin
message Status{
int32 code = 1; //错误码
string message = 2; //错误信息
repeated google.protobuf.Any details = 3; //套娃专用
}

View File

@@ -0,0 +1,25 @@
syntax = "proto3";
package bilibili.metadata.network;
enum Type{
NT_UNKNOWN = 0;
WIFI = 1; //wifi
CELLULAR = 2; //蜂窝网络
OFFLINE = 3; //离线
ETHERNET = 5; //以太网
OTHERNET = 4; //其他
}
/*
enum Tf{
}*/
//网络类型标识
//x-bili-network-bin
message Network{
Type type = 1; //网络类型
//Tf tf = 2;
int32 tf = 2;
string oid = 3;
}

View File

@@ -0,0 +1,8 @@
syntax = "proto3";
package bilibili.metadata.restriction;
enum ModeType{
NORMAL = 0;
TEENAGERS = 1;
LESSONS = 2;
}