Browse Source

v0.0.1开发:apis服务定义

#Suyghur 3 years ago
parent
commit
1543da89f9
5 changed files with 65 additions and 15 deletions
  1. 19 0
      apis/auth/pb/auth.proto
  2. 30 0
      apis/cmd/pb/cmd.proto
  3. 0 15
      apis/rpc/apis.proto
  4. 8 0
      db/pb/db.proto
  5. 8 0
      inner/pb/inner.proto

+ 19 - 0
apis/auth/pb/auth.proto

@@ -0,0 +1,19 @@
+syntax = "proto3";
+
+option go_package = "./pb";
+
+package pb;
+
+import "google/protobuf/struct.proto";
+
+message AuthResp{
+  int64 code = 1;
+  string msg = 2;
+  google.protobuf.Struct data = 3;
+}
+
+service Auth{
+  rpc playerAuth (google.protobuf.Struct) returns (AuthResp);
+  rpc csAuth (google.protobuf.Struct) returns (AuthResp);
+  rpc checkAuth (google.protobuf.Struct) returns (AuthResp);
+}

+ 30 - 0
apis/cmd/pb/cmd.proto

@@ -0,0 +1,30 @@
+syntax = "proto3";
+
+option go_package = "./pb";
+
+package pb;
+
+import "google/protobuf/struct.proto";
+
+
+message CmdResp{
+  int64 code = 1;
+  string msg = 2;
+  google.protobuf.Struct data = 3;
+}
+
+service Cmd {
+  rpc playerFetchCsInfo (google.protobuf.Struct) returns (CmdResp);
+  rpc playerFetchHistoryMsg (google.protobuf.Struct) returns (CmdResp);
+  rpc playerFetchMsg (google.protobuf.Struct) returns (CmdResp);
+  rpc playerSendMsg (google.protobuf.Struct) returns (CmdResp);
+  rpc playerDisconnect (google.protobuf.Struct) returns (CmdResp);
+
+  rpc csFetchPlayerInfo (google.protobuf.Struct) returns (CmdResp);
+  rpc csFetchPlayerQueue (google.protobuf.Struct) returns (CmdResp);
+  rpc csConnectPlayer (google.protobuf.Struct) returns (CmdResp);
+  rpc csFetchHistoryChat (google.protobuf.Struct) returns (CmdResp);
+  rpc csFetchHistoryMsg (google.protobuf.Struct) returns (CmdResp);
+  rpc csFetchMsg (google.protobuf.Struct) returns (CmdResp);
+  rpc csSendMsg (google.protobuf.Struct) returns (CmdResp);
+}

+ 0 - 15
apis/rpc/apis.proto

@@ -1,15 +0,0 @@
-syntax = "proto3";
-
-package stream;
-
-message StreamReq {
-  string name = 1;
-}
-
-message StreamResp {
-  string greet = 1;
-}
-
-service StreamGreeter {
-  rpc greet(StreamReq) returns (StreamResp);
-}

+ 8 - 0
db/pb/db.proto

@@ -0,0 +1,8 @@
+syntax = "proto3";
+
+option go_package = "./pb";
+
+package pb;
+
+service Db {
+}

+ 8 - 0
inner/pb/inner.proto

@@ -0,0 +1,8 @@
+syntax = "proto3";
+
+option go_package = "./pb";
+
+package pb;
+
+service Inner {
+}